一、源码下载 下面是hadoop官方源码下载地址,我下载的是hadoop-3.2.4,那就一起来看下吧 Index of /dist/hadoop/core 二、Reducer类 我们先看下我们写的reduce所继承的Reducer类 public class Reducer<KEYIN,VALUEIN,KEYOUT,VALUEOUT> { /** * 传递给Reducer实现的上下文 */ public abstract class Context implements ReduceContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT> { } /** * 在任务开始时调用一次 */ protected void setup(Context context ) throws IOException, InterruptedException { // NOTHING } /** * 每个键调用一次此方法。大多数应用程序将通过重写此方法来定义其reduce类。默认实现是标识函数 * */ @SuppressWarnings("unchecked")...