hadoop编译map/reduce时的问题

参考链接

http://hadoop.apache.org/common/docs/stable/mapred_tutorial.html

http://blog.endlesscode.com/2010/06/16/simple-demo-of-mapreduce-in-java/

When you run a hadoop jar this is the command which you should run in the directory you put the jar in (e.g. /usr/lib/hadoop-0.20/bin )

  • hadoop jar NAMEOFJAR.jar arg1 arg2 argN

from your question this could be how to run it (make the cd to hadoop directory for the version of hadoop your running)

  • cp MaxTemperature.jar /usr/lib/hadoop-0.20/bin
  • su hadoop
  • cd /usr/lib/hadoop-0.20/bin
  • hadoop jar MaxTemperature.jar input/ncdc/sample.txt output
原文地址:https://www.cnblogs.com/zl0372/p/hadoop_4.html