windows系统调试MapReduce程序

如果使用windows开发mapreduce程序,是不能进行debug的,会报如下错误,但其实不影响最终运行结果

DEBUG o.a.h.u.Shell - Failed to detect a valid hadoop home directory
java.io.IOException: HADOOP_HOME or hadoop.home.dir are not set.
ERROR o.a.h.u.Shell - Failed to locate the winutils binary in the hadoop binary path
java.io.IOException: Could not locate executable null\bin\winutils.exe in the Hadoop binaries.

首先需要设置环境变量,类似JAVA_HOME

bin目录放入winutils.exe和hadoop.dll两个文件, 网上下载,很多

然后将他们两个再在C:\Windows\System32路径下放一份,这个时候就可以在windows系统debug MR程序了

猜你喜欢

转载自www.cnblogs.com/xhy-shine/p/10641358.html