예제 #1
0
 public void reduce(KeyWritable key, Iterable<BytesWritable> values, Context ctx)
     throws IOException, InterruptedException {
   for (BytesWritable value : values) {
     long startTime = System.currentTimeMillis();
     ctx.write(key, value);
     long elapsedTime = System.currentTimeMillis() - startTime;
     ctx.getCounter(Counters.ELAPSED_TIME_MS).increment(elapsedTime);
     ctx.getCounter(Counters.NUM_CELLS).increment(1);
   }
 }
예제 #2
0
  public static void main(String[] args) throws Exception {

    LoadTest test = new LoadTest();
    System.exit(test.run(args));
  }