Hadoop之MapReduce 本机windows模式运行

hadoop在windows本机运行

(1)在 windows环境下编译好的hadoop放到没有中文和空格的路径下

(2)编译好的hadoop内的hadoop.all文件要放到windows机器的windows-system32目录下 ,

否则报错

(3)配置windows环境下的hadoop环境变量

(4)设置输入路径和输出路径  以file:///开头

或者同时设置下面这两个参数  (hadoop2.6.0-cdh-5.14.0版本 不设置也可以运行 其他版本不清楚)

configuration.set("mapreduce.framework.name","local");
configuration.set(" yarn.resourcemanager.hostname","local");

 

最后老子运行成功,成功输出结果了还是报这个错 (待解决)

ERROR util.Shell: Failed to locate the winutils binary in the hadoop binary path
java.io.IOException: Could not locate executable D:\hadoop-2.6.0-cdh5.14.0\bin\bin\winutils.exe in the Hadoop binaries.

 

 

 

猜你喜欢

转载自www.cnblogs.com/roujiamo/p/10051206.html
今日推荐