首先在本地系统里
mkdir playground
mkdir playground/src
mkdir playground/classes
接着把WordCount.java COPY到playground/src
cp src/examples/org/apache/hadoop/examples/WordCount.java playground/src/WordCount.java
在本地系统里编译WordCount.java
javac -classpath hadoop-0.20.2-core.jar:lib/commons-cli-1.2.jar -d playground/classes/ playground/src/WordCount.java
cd playground/classes/
jar -cvf wordcount.jar *
在hdfs系统下
bin/hadoop jar playground/classes/wordcount.jar org.apache.hadoop.examples.WordCount input output
看成果
bin/hadoop fs -cat output/*