FileInputFormat.addInputPath(job, new Path(TEST_ROOT_DIR + "/in"));
String tableUri = new Path(TEST_ROOT_DIR + "/out").toString();
CsvBlurMapper.addColumns(job, "cf1", "col");
TableDescriptor tableDescriptor = new TableDescriptor();
tableDescriptor.setShardCount(2);
tableDescriptor.setTableUri(tableUri);
tableDescriptor.setName("test");
createShardDirectories(outDir, 2);
BlurOutputFormat.setupJob(job, tableDescriptor);
BlurOutputFormat.setIndexLocally(job, false);
BlurOutputFormat.setDocumentBufferStrategy(job, DocumentBufferStrategyHeapSize.class);
BlurOutputFormat.setMaxDocumentBufferHeapSize(job, 128 * 1024);
assertTrue(job.waitForCompletion(true));
Counters ctrs = job.getCounters();
System.out.println("Counters: " + ctrs);
long total = 0;
for (int i = 0; i < tableDescriptor.getShardCount(); i++) {
Path path = new Path(tableUri, BlurUtil.getShardName(i));
Collection<Path> commitedTasks = getCommitedTasks(path);
assertEquals(1, commitedTasks.size());
DirectoryReader reader = DirectoryReader.open(new HdfsDirectory(conf, commitedTasks.iterator().next()));