public void testConversion() throws IOException {
Configuration conf = new Configuration();
JobContext jc = new JobContext(conf, new JobID());
HowlSchema schema = buildHiveSchema();
HowlInputStorageDriver isd = new RCFileInputDriver();
isd.setOriginalSchema(jc, schema);
isd.setOutputSchema(jc, schema);
isd.initialize(jc, new Properties());
byte[][] byteArray = buildBytesArray();
BytesRefArrayWritable bytesWritable = new BytesRefArrayWritable(byteArray.length);
for (int i = 0; i < byteArray.length; i++) {
BytesRefWritable cu = new BytesRefWritable(byteArray[i], 0, byteArray[i].length);
bytesWritable.set(i, cu);
}
//Convert byte array to HowlRecord using isd, convert howlrecord back to byte array
//using osd, compare the two arrays
HowlRecord record = isd.convertToHowlRecord(null, bytesWritable);
HowlOutputStorageDriver osd = new RCFileOutputDriver();
osd.setSchema(jc, schema);
osd.initialize(jc, new Properties());