http://trac.nchc.org.tw/cloud/wiki/waue/2009/0617

这篇文章已经叙述的很不错了

采用eclipse3.3 暂时是不会有任何问题,执行run as 那个wordcount会有错误提示

hadoop

09/10/09 17:17:25 WARN conf.Configuration: DEPRECATED: -site.xml found in the classpath. Usage of -site.xml is deprecated. Instead use core-site.xml, mapred-site.xml and hdfs-site.xml to override

properties of core-default.xml, mapred-default.xml and hdfs-default.xml respectively
Usage: wordcount <in> <out>

代码问题,可以暂时不用管

另外文章中给出的

JarFile="sample-0.1.jar"
MainFunc="Sample.WordCount"
LocalOutDir="/tmp/output"

all:help
jar:
  jar -cvf ${JarFile} -C bin/ .

run:
   jar ${JarFile} ${MainFunc} input output

clean:
   fs -rmr output

output:
  rm -rf ${LocalOutDir}
   fs -get output ${LocalOutDir}
  gedit ${LocalOutDir}/part-r-00000 & 

help:
  @echo "Usage:"
  @echo " make jar     - Build Jar File."
  @echo " make clean   - Clean up Output directory on HDFS."
  @echo " make run     - Run your MapReduce code on ."
  @echo " make output  - Download and show output file"
  @echo " make help    - Show Makefile options."
  @echo " "
  @echo "Example:"
  @echo " make jar; make run; make output; make clean"
这个makefile很不错,复制的时候注意使用tab
然后运行编译在eclipse3.3和3.4版本都很正常
目前有几个问题就是eclipse3.4版用-0.20.0--plugin.jar 我这边出错,读不到这个插件,
用-0.19.2--plugin.jar的时候连接不到本地的服务
还好用我最新编译的-0.20.1--plugin.jar 可以正常使用,不过蛮搞笑的是用了这个,
在perspective添加了MapReduce的时候那个Map/Reduce Locations不会显示出来,要手动添加,
我不知道是我个人问题,还是普遍情况
hadoop2
目前都可以连接到我的服务上,可以在里面查看上传文件
eclipse3.3版本我是用0.20.0的-plugin
eclipse3.4版本我是用我自己编译的0.20.1的plugin  下载hadoop-0.20.1-eclipse-plugin.jar
标签:, , , , ,

相关日志


相关博文

6 条评论

  1. 在 的时候,出现了以下错误,请问应该怎样解决呢?谢谢博主
    hadoop jar “sample-0.1.jar” “Sample.WordCount” input output
    /bin/sh: hadoop: not found
    make: *** [run] Error 127

    回复本留言

    jimey Reply:

    你那127行啥错误?

    回复本留言

    tonia Reply:

    @jimey,
    Sorry, but what do you mean?
    I’ve got the same error. What’s the matter?
    Thanks.

    回复本留言

    jimey Reply:

    @tonia, 应该是运行时候路径设置错误了吧?没找到hadoop/bin/里面去…去找/bin/sh去了..自然是找不到了…另外你是在啥环境下运行的?具体配置是怎么样的?

  2. 10/08/13 09:37:03 WARN conf.Configuration: DEPRECATED: hadoop-site.xml found in the classpath. Usage of hadoop-site.xml is deprecated. Instead use core-site.xml, mapred-site.xml and hdfs-site.xml to override properties of core-default.xml, mapred-default.xml and hdfs-default.xml respectively
    Usage: wordcount
    这个错误是怎么回事呢?我也遇到了同样的问题,但是看了您的博客,还是不太明白。

    回复本留言

    jimey Reply:

    @牛啃草, 可能是你参考的教程是老的.新版的hadoop已经不用hadoop-site.xml了.需要分别在core-site.xml, mapred-site.xml and hdfs-site.xml 里面设置.

    回复本留言

Post comment

comment has COPYRIGHT too!