BasicTable.Writer writer = new BasicTable.Writer(path, STR_SCHEMA,
STR_STORAGE, false, conf);
writer.finish();
Schema schema = writer.getSchema();
Tuple tuple = TypesUtils.createTuple(schema);
BasicTable.Writer writer1 = new BasicTable.Writer(path, conf);
int part = 0;
TableInserter inserter = writer1.getInserter("part" + part, true);
TypesUtils.resetTuple(tuple);
DataBag bag1 = TypesUtils.createBag();
Schema schColl = schema.getColumn(0).getSchema();
Tuple tupColl1 = TypesUtils.createTuple(schColl);
Tuple tupColl2 = TypesUtils.createTuple(schColl);
DataBag bag2 = TypesUtils.createBag();
Schema schColl2 = schema.getColumn(1).getSchema();
Tuple tupColl2_1 = TypesUtils.createTuple(schColl2);
Tuple tupColl2_2 = TypesUtils.createTuple(schColl2);
Tuple collRecord1;
try {
collRecord1 = TypesUtils.createTuple(new Schema("f1:int, f2:string"));
} catch (ParseException e) {
e.printStackTrace();
throw new IOException(e);
}
Tuple collRecord2;
try {
collRecord2 = TypesUtils.createTuple(new Schema("f1:int, f2:string"));
} catch (ParseException e) {
e.printStackTrace();
throw new IOException(e);
}
// c3:collection(c3_1:collection(e:int,f:bool))
DataBag bag3 = TypesUtils.createBag();
Schema schColl3 = schema.getColumn(2).getSchema();
DataBag bag3_1 = TypesUtils.createBag();
DataBag bag3_2 = TypesUtils.createBag();
Tuple tupColl3_1 = null;
try {
tupColl3_1 = TypesUtils.createTuple(new Schema("e:int,f:bool"));
} catch (ParseException e) {
e.printStackTrace();
throw new IOException(e);
}
Tuple tupColl3_2;
try {
tupColl3_2 = TypesUtils.createTuple(new Schema("e:int,f:bool"));
} catch (ParseException e) {
e.printStackTrace();
throw new IOException(e);
}
Tuple tupColl3_3 = null;
try {
tupColl3_3 = TypesUtils.createTuple(new Schema("e:int,f:bool"));
} catch (ParseException e) {
e.printStackTrace();
throw new IOException(e);
}
Tuple tupColl3_4;
try {
tupColl3_4 = TypesUtils.createTuple(new Schema("e:int,f:bool"));
} catch (ParseException e) {
e.printStackTrace();
throw new IOException(e);
}