Java 类org.apache.hadoop.hbase.mapreduce.RowCounter.RowCounterMapper 实例源码

项目:ditb    文件:TestRowCounter.java   
/**
 * Run the RowCounter map reduce job and verify the row count.
 *
 * @param args the command line arguments to be used for rowcounter job.
 * @param expectedCount the expected row count (result of map reduce job).
 * @throws Exception
 */
private void runRowCount(String[] args, int expectedCount)
    throws Exception {
  GenericOptionsParser opts = new GenericOptionsParser(TEST_UTIL.getConfiguration(), args);
  Configuration conf = opts.getConfiguration();
  args = opts.getRemainingArgs();
  Job job = RowCounter.createSubmittableJob(conf, args);
  job.waitForCompletion(true);
  assertTrue(job.isSuccessful());
  Counter counter = job.getCounters().findCounter(RowCounterMapper.Counters.ROWS);
  assertEquals(expectedCount, counter.getValue());
}
项目:pbase    文件:TestRowCounter.java   
/**
 * Run the RowCounter map reduce job and verify the row count.
 *
 * @param args the command line arguments to be used for rowcounter job.
 * @param expectedCount the expected row count (result of map reduce job).
 * @throws Exception
 */
private void runRowCount(String[] args, int expectedCount)
    throws Exception {
  GenericOptionsParser opts = new GenericOptionsParser(TEST_UTIL.getConfiguration(), args);
  Configuration conf = opts.getConfiguration();
  args = opts.getRemainingArgs();
  Job job = RowCounter.createSubmittableJob(conf, args);
  job.waitForCompletion(true);
  assertTrue(job.isSuccessful());
  Counter counter = job.getCounters().findCounter(RowCounterMapper.Counters.ROWS);
  assertEquals(expectedCount, counter.getValue());
}
项目:HIndex    文件:TestRowCounter.java   
/**
 * Run the RowCounter map reduce job and verify the row count.
 * 
 * @param args the command line arguments to be used for rowcounter job.
 * @param expectedCount the expected row count (result of map reduce job).
 * @throws Exception
 */
private void runRowCount(String[] args, int expectedCount) throws Exception {
  GenericOptionsParser opts = new GenericOptionsParser(
      TEST_UTIL.getConfiguration(), args);
  Configuration conf = opts.getConfiguration();
  args = opts.getRemainingArgs();
  Job job = RowCounter.createSubmittableJob(conf, args);
  job.waitForCompletion(true);
  assertTrue(job.isSuccessful());
  Counter counter = job.getCounters().findCounter(
      RowCounterMapper.Counters.ROWS);
  assertEquals(expectedCount, counter.getValue());
}
项目:PyroDB    文件:TestRowCounter.java   
/**
 * Run the RowCounter map reduce job and verify the row count.
 * 
 * @param args the command line arguments to be used for rowcounter job.
 * @param expectedCount the expected row count (result of map reduce job).
 * @throws Exception
 */
private void runRowCount(String[] args, int expectedCount) throws Exception {
  GenericOptionsParser opts = new GenericOptionsParser(
      TEST_UTIL.getConfiguration(), args);
  Configuration conf = opts.getConfiguration();
  args = opts.getRemainingArgs();
  Job job = RowCounter.createSubmittableJob(conf, args);
  job.waitForCompletion(true);
  assertTrue(job.isSuccessful());
  Counter counter = job.getCounters().findCounter(
      RowCounterMapper.Counters.ROWS);
  assertEquals(expectedCount, counter.getValue());
}
项目:c5    文件:TestRowCounter.java   
/**
 * Run the RowCounter map reduce job and verify the row count.
 * 
 * @param args the command line arguments to be used for rowcounter job.
 * @param expectedCount the expected row count (result of map reduce job).
 * @throws Exception
 */
private void runRowCount(String[] args, int expectedCount) throws Exception {
  GenericOptionsParser opts = new GenericOptionsParser(
      TEST_UTIL.getConfiguration(), args);
  Configuration conf = opts.getConfiguration();
  args = opts.getRemainingArgs();
  Job job = RowCounter.createSubmittableJob(conf, args);
  job.waitForCompletion(true);
  assertTrue(job.isSuccessful());
  Counter counter = job.getCounters().findCounter(
      RowCounterMapper.Counters.ROWS);
  assertEquals(expectedCount, counter.getValue());
}
项目:DominoHBase    文件:TestRowCounter.java   
/**
 * Run the RowCounter map reduce job and verify the row count.
 * 
 * @param args the command line arguments to be used for rowcounter job.
 * @param expectedCount the expected row count (result of map reduce job).
 * @throws Exception
 */
private void runRowCount(String[] args, int expectedCount) throws Exception {
  GenericOptionsParser opts = new GenericOptionsParser(
      TEST_UTIL.getConfiguration(), args);
  Configuration conf = opts.getConfiguration();
  args = opts.getRemainingArgs();
  Job job = RowCounter.createSubmittableJob(conf, args);
  job.waitForCompletion(true);
  assertTrue(job.isSuccessful());
  Counter counter = job.getCounters().findCounter(
      RowCounterMapper.Counters.ROWS);
  assertEquals(expectedCount, counter.getValue());
}