hadoop2.2 API http://hadoop.apache.org/docs/r0.23.9/api/index.html junit API http://junit.org/javadoc/4.10/ mrunit mrunit API http://mrunit.apache.org/documentation/javadocs/1.0.0/index.html mrunit package-summary http://mrunit.apache.org/documentati…
1. Reading data from a hadoop URL 说明:想要让java从hadoop的dfs里读取数据,则java 必须能够识别hadoop hdfs URL schema, 因此我们应该将hdfs的FsUrlStreamHandlerFactory作为一个实例提供给java, java的setURLStreamHandlerFactory方法可以实现此功能: 注意:此方法有缺陷,由于在java里,setURLStreamHandlerFactorymethod在每一个JVM里…
mr自带的例子中的源码SecondarySort,我重新写了一下,基本没变. 这个例子中定义的map和reduce如下,关键是它对输入输出类型的定义:(java泛型编程) public static class Map extends Mapper<LongWritable, Text, IntPair, IntWritable> public static class Reduce extends Reducer<IntPair, NullWritable, IntWritable,…
引用地址:http://www.cnblogs.com/lucius/p/3442381.html examples: Overview This document explains how to write unit tests for your map reduce code, and testing your mapper and reducer logic on your desktop without having any Hadoop environment setup. Let's…