Window7中Eclipse運行MapReduce程式報錯的問題

來源:互聯網
上載者:User

標籤:style   blog   http   java   color   strong   檔案   io   

按照文檔:http://www.micmiu.com/bigdata/hadoop/hadoop2x-eclipse-mapreduce-demo/安裝配置好Eclipse後,運行WordCount程式報錯:

log4j:WARN No appenders could be found for logger (org.apache.hadoop.metrics2.lib.MutableMetricsFactory).log4j:WARN Please initialize the log4j system properly.log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.Exception in thread "main" java.lang.NullPointerException    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1011)    at org.apache.hadoop.util.Shell.runCommand(Shell.java:404)    at org.apache.hadoop.util.Shell.run(Shell.java:379)    at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:589)    at org.apache.hadoop.util.Shell.execCommand(Shell.java:678)    at org.apache.hadoop.util.Shell.execCommand(Shell.java:661)    at org.apache.hadoop.fs.RawLocalFileSystem.setPermission(RawLocalFileSystem.java:639)    at org.apache.hadoop.fs.RawLocalFileSystem.mkdirs(RawLocalFileSystem.java:435)    at org.apache.hadoop.fs.FilterFileSystem.mkdirs(FilterFileSystem.java:277)    at org.apache.hadoop.mapreduce.JobSubmissionFiles.getStagingDir(JobSubmissionFiles.java:125)    at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:344)    at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1268)    at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1265)    at java.security.AccessController.doPrivileged(Native Method)    at javax.security.auth.Subject.doAs(Subject.java:415)    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491)    at org.apache.hadoop.mapreduce.Job.submit(Job.java:1265)    at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1286)    at com.telchina.hadoop.WordCount.main(WordCount.java:84)

經過google,發現http://www.uniorder.com/2014/03/31/%E5%9C%A8%20Windows%20%E4%B8%8A%E4%BD%BF%E7%94%A8%20Eclipse%20%E8%BF%9C%E7%A8%8B%E8%B0%83%E8%AF%95%20Hadoop%202.2%20MapReduce%20%E7%A8%8B%E5%BA%8F/中:

下載 Hadoop 2.2 到你的 Windows 機器上(我是 Windows 7)並設定環境變數:HADOOP_HOME=你的Hadoop所在目錄,再在Path中加入%HADOOP_HOME%\bin;。此時還沒有完成。你需要去下載一些檔案覆蓋 Hadoop/bin 下的所有檔案(戳這裡)。

問題解決。



sdjnzqr
出處:http://www.cnblogs.com/sdjnzqr/
著作權:本文著作權歸作者和部落格園共有
轉載:歡迎轉載,但未經作者同意,必須保留此段聲明;必須在文章中給出原文串連;否則必究法律責任
相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.