}
for (int i = 0; i < parts; ++i) {
Path workPath = new Path(path.getParent(), "_temporary");
writer = new ColumnGroup.Writer(path, workPath, conf);
TableInserter inserter = writer.getInserter(String.format("part-%06d",
permutation[i]), true);
if ((rows > 0) && !emptyTFileSet.contains(permutation[i])) {
int actualRows = random.nextInt(rows) + rows / 2;
for (int j = 0; j < actualRows; ++j, ++total) {
BytesWritable key;
if (!sorted) {
key = makeRandomKey(rows * 10);
} else {
key = makeKey(total);
}
TypesUtils.resetTuple(tuple);
for (int k = 0; k < tuple.size(); ++k) {
try {
tuple.set(k, makeString("col-" + colNames[k], rows * 10));
} catch (ExecException e) {
e.printStackTrace();
}
}
inserter.insert(key, tuple);
}
}
inserter.close();
}
if (properClose) {
writer = new ColumnGroup.Writer(path, conf);
writer.close();