学习一门技术,并不仅仅要会用,还要知道它的原理,这里简单分析一下Hadoop样例程序源码,便于后边的学习(分析的不到位,还望各位指教)。
在hadoop-2.2.0.tar.gz文件下没有找到源码(新版本不但没有Eclipse插件,也没有源码,只有.class字节码文件),可以下载hadoop-2.2.0-src.tar.gz,解压,然后在hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples目录下获取源码。
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you u