public static final List<MapWritable> mapperData2 = ImmutableList.of(row3, row4);
private HiveTools() {}
public static HiveWritableRecord mapToHiveRecord(MapWritable value) {
HiveWritableRecord record = HiveRecordFactory.newWritableRecord(HiveTools.NUM_COLUMNS);
for (Map.Entry<Writable, Writable> entry : value.entrySet()) {
IntWritable intKey = (IntWritable) entry.getKey();
LongWritable longValue = (LongWritable) entry.getValue();
record.set(intKey.get(), longValue.get());
}
return record;
}