Program: 82302
Project: 82302
Buggy source:
@Test public void testBlurOutputFormat() throws IOException, InterruptedException, ClassNotFoundException, BlurException, TException {
  fileSystem.delete(inDir,true);
  String tableName="String_Node_Str";
  writeRecordsFile("String_Node_Str",1,1,1,1,"String_Node_Str");
  writeRecordsFile("String_Node_Str",1,1,2,1,"String_Node_Str");
  Job job=new Job(jobConf,"String_Node_Str");
  job.setJarByClass(BlurOutputFormatMiniClusterTest.class);
  job.setMapperClass(CsvBlurMapper.class);
  job.setInputFormatClass(TextInputFormat.class);
  FileInputFormat.addInputPath(job,new Path(TEST_ROOT_DIR + "String_Node_Str"));
  String tableUri=new Path(TEST_ROOT_DIR + "String_Node_Str" + tableName).toString();
  CsvBlurMapper.addColumns(job,"String_Node_Str","String_Node_Str");
  TableDescriptor tableDescriptor=new TableDescriptor();
  tableDescriptor.setShardCount(1);
  tableDescriptor.setTableUri(tableUri);
  tableDescriptor.setName(tableName);
  Iface client=getClient();
  client.createTable(tableDescriptor);
  BlurOutputFormat.setupJob(job,tableDescriptor);
  assertTrue(job.waitForCompletion(true));
  Counters ctrs=job.getCounters();
  System.out.println("String_Node_Str" + ctrs);
  while (true) {
    TableStats tableStats=client.tableStats(tableName);
    System.out.println(tableStats);
    if (tableStats.getRowCount() > 0) {
      break;
    }
    Thread.sleep(5000);
  }
}

Fixed version (ground truth):
@Test public void testBlurOutputFormat() throws IOException, InterruptedException, ClassNotFoundException, BlurException, TException {
  fileSystem.delete(inDir,true);
  String tableName="String_Node_Str";
  writeRecordsFile("String_Node_Str",1,1,1,1,"String_Node_Str");
  writeRecordsFile("String_Node_Str",1,1,2,1,"String_Node_Str");
  Job job=new Job(jobConf,"String_Node_Str");
  job.setJarByClass(BlurOutputFormatMiniClusterTest.class);
  job.setMapperClass(CsvBlurMapper.class);
  job.setInputFormatClass(TextInputFormat.class);
  FileInputFormat.addInputPath(job,new Path(TEST_ROOT_DIR + "String_Node_Str"));
  String tableUri=new Path(TEST_ROOT_DIR + "String_Node_Str" + tableName).toString();
  CsvBlurMapper.addColumns(job,"String_Node_Str","String_Node_Str");
  TableDescriptor tableDescriptor=new TableDescriptor();
  tableDescriptor.setShardCount(1);
  tableDescriptor.setTableUri(tableUri);
  tableDescriptor.setName(tableName);
  Iface client=getClient();
  client.createTable(tableDescriptor);
  BlurOutputFormat.setupJob(job,tableDescriptor);
  Path tablePath=new Path(tableUri);
  Path shardPath=new Path(tablePath,BlurUtil.getShardName(0));
  FileStatus[] listStatus=fileSystem.listStatus(shardPath);
  assertEquals(2,listStatus.length);
  System.out.println("String_Node_Str" + listStatus.length);
  for (  FileStatus fileStatus : listStatus) {
    System.out.println(fileStatus.getPath());
  }
  assertTrue(job.waitForCompletion(true));
  Counters ctrs=job.getCounters();
  System.out.println("String_Node_Str" + ctrs);
  while (true) {
    TableStats tableStats=client.tableStats(tableName);
    System.out.println(tableStats);
    if (tableStats.getRowCount() > 0) {
      break;
    }
    Thread.sleep(5000);
  }
  assertTrue(fileSystem.exists(tablePath));
  assertFalse(fileSystem.isFile(tablePath));
  FileStatus[] listStatusAfter=fileSystem.listStatus(shardPath);
  assertEquals(9,listStatusAfter.length);
}