hadoop伪分布模式下的编程步骤

haoop工作在伪分布模式下,以MaxTemperature.java为例:


1.javac -classpath  /home/tom/hadoop/hadoop-core-1.0.3.jar  -d maxtemperature_classes  MaxTemperature.java

2.jar -cvf maxtemperature.jar  -Cmaxtemperature_classes/ .

3.hadoop jar maxtemperature.jar MaxTemperature  /user/tom/input/ncdc/sample.txt output

4.bin/hadoop fs -cat /user/tom/output/part-r-00000


把hadoop-core-1.0.3.jar文件加到jdk的classpath里面

 

1.javac  MaxTemperature.java

2.jar -cvf cihui.jar *.class

3.hadoop MaxTemperature input/ncdc/sample.txt output

4.bin/hadoop fs -cat /user/tom/output/part-r-00000



你可能感兴趣的:(jdk,编程,hadoop,工作,jar,output)