tupColl2_2.set(0, mapInCollection);
bag2.add(tupColl2_2);
tuple.set(7, bag2);
int row = 0;
inserter.insert(new BytesWritable(String.format("k%d%d", part + 1, row + 1)
.getBytes()), tuple);
// row 2
row++;
TypesUtils.resetTuple(tuple);
column5.clear();
column7.clear();
column6.clear();
mapInCollection.clear();
bag2.clear();
TypesUtils.resetTuple(tupColl2_1);
TypesUtils.resetTuple(tupColl2_2);
tuple.set(0, new DataByteArray("column1 row 2 ")); // byte
tuple.set(1,new DataByteArray("column2 row 2"));
tuple.set(2, new DataByteArray("column3 row 2"));
tuple.set(3, new DataByteArray("column4 row 2"));
// column5
column5.put("key51", "key512");
column5.put("key52", "key522");
column5.put("key53", "key532");
column5.put("key54", "key542");
column5.put("key55", "key552");
column5.put("key56", "key562");
column5.put("key57", "key572");
tuple.set(4, column5);
// column6
column6.put("column6", "column62");
column7.put("key71", "key712");
column7.put("key72", "key722");
column7.put("key73", "key732");
column7.put("key74", "key742");
column7.put("key75", "key752");
tuple.set(6, column7);
tuple.set(5, column6);
//column8
//column8:collection(f1:map(bytes))
mapInCollection.put("mc", "mc2");
tupColl2_1.set(0, mapInCollection);
bag2.add(tupColl2_1);
tupColl2_2.set(0, mapInCollection);
bag2.add(tupColl2_2);
tuple.set(7, bag2);
inserter.insert(new BytesWritable(String.format("k%d%d", part + 1, row + 1)
.getBytes()), tuple);
// finish building table, closing out the inserter, writer, writer1
inserter.close();
writer1.finish();