@Test
 public void testReducer() throws IOException {
   reduceDriver.withInput(
       new Text("Apr 25"),
       Arrays.asList(new LongWritable(3), new LongWritable(5), new LongWritable(9)));
   reduceDriver.withOutput(new Text("Apr 25"), new LongWritable(17));
   reduceDriver.runTest();
 }
 @Test
 public void testReducer() throws IOException {
   List<Text> values = new ArrayList<Text>();
   values.add(outputdir);
   // TODO test multiple values
   reduceDriver.withInput(new LongWritable(0), values);
   reduceDriver.withOutput(new LongWritable(0), new Text(outputdir.toString() + "\n"));
   reduceDriver.runTest();
 }
Пример #3
0
 @Test
 public void testReducer() throws IOException {
   List<IntWritable> values = new ArrayList<IntWritable>();
   values.add(new IntWritable(4028));
   values.add(new IntWritable(1024));
   reduceDriver.withInput(new Text("ip1"), values);
   reduceDriver.withOutput(new Text("ip1"), new AggregatedValue(5052, 2526));
   reduceDriver.runTest();
 }