@Test
 public void testMapperReducer() throws IOException {
   mapReduceDriver.withInput(
       new LongWritable(),
       new Text(
           "Wed Apr 24 23:04:58 2013 [SESSION 2954383360]: Scanning path '/Users/komamitsu/Library/Caches/com.avast.registration/Cache.db' started."));
   mapReduceDriver.withInput(
       new LongWritable(),
       new Text(
           "Wed Apr 25 23:04:58 2013 [SESSION 2954383360]: Scanning path '/Users/komamitsu/Library/Caches/com.avast.registration/Cache.db' started."));
   mapReduceDriver.withInput(
       new LongWritable(),
       new Text(
           "Wed Apr 24 23:04:58 2013 [SESSION 2954383360]: Scanning path '/Users/komamitsu/Library/Caches/com.avast.registration/Cache.db' started."));
   mapReduceDriver.withOutput(new Text("Apr 24"), new LongWritable(2));
   mapReduceDriver.withOutput(new Text("Apr 25"), new LongWritable(1));
   mapReduceDriver.runTest();
 }
示例#2
0
 @Test
 public void testMapReduce() throws IOException {
   mapReduceDriver.withInput(new LongWritable(), new Text(INPUT_LINE));
   mapReduceDriver.withOutput(new Text("ip1"), new AggregatedValue(40028, 40028));
   mapReduceDriver.runTest();
 }