Windows下运行MapReduce程序出现Could not locate executable null\winutils.exe in the Hadoop binaries....

原文链接: http://www.cnblogs.com/lzq666/p/9956967.html

运行环境:windows10 64位,虚拟机:Ubuntu Kylin 14.04,Hadoop2.7.1

错误信息:

java.io.IOException: Could not locate executable D:\hadoop\bin\winutils.exe in the Hadoop binaries.
    at org.apache.hadoop.util.Shell.getQualifiedBinPath(Shell.java:356)
    at org.apache.hadoop.util.Shell.getWinUtilsPath(Shell.java:371)
    at org.apache.hadoop.util.Shell.(Shell.java:364)
    at org.apache.hadoop.util.StringUtils.(StringUtils.java:80)
    at org.apache.hadoop.security.SecurityUtil.getAuthenticationMethod(SecurityUtil.java:610)

 ……

 ……

解决办法:

  配置环境变量,新建变量HADOOP_HOME,值为Hadoop目录,在PATH中添加%HADOOP_HOME%\bin(可能要重启)

  下载winutils(hadoop2.7.x) https://download.csdn.net/download/gendlee1991/10167002

  winutils.exe放置在%HADOOP_HOME%\bin目录下,,hadoop.dll放置在Windows\System下。

  参考文章:https://blog.csdn.net/love666666shen/article/details/78812622

转载于:https://www.cnblogs.com/lzq666/p/9956967.html

你可能感兴趣的:(Windows下运行MapReduce程序出现Could not locate executable null\winutils.exe in the Hadoop binaries....)