编译hadoop自带的wnordcout例子

cd /home/jason/hadoop-1.0.1/
mkdir playground
mkdir playground/src
mkdir playground/classes
cp src/examples/org/apache/hadoop/examples/WordCount.java playground/src/
javac -classpath hadoop-core-1.0.1.jar -Djava.ext.dirs=lib/ -d playground/classes/ playground/src/WordCount.java
jar -cvf playground/wordcount.jar -C playground/classes/ .
hadoop jar playground/wordcount.jar org.apache.hadoop.examples.WordCount /input /output

你可能感兴趣的:(hadoop,wordcount,example)