java.io.IOException: Could not locate executable null\bin\winutils.exe in the Hadoop binaries.

windows下运行hadoop的程序报错java.io.IOException: Could not locate executable null\bin\winutils.exe in the Hadoop binaries.

这是因为windows环境变量不兼容的原因

java.io.IOException: Could not locate executable null\bin\winutils.exe in the Hadoop binaries._第1张图片


解决办法:

下载winutils地址https://github.com/srccodes/hadoop-common-2.2.0-bin下载解压

配置环境变量
增加用户变量HADOOP_HOME,值是下载的zip包解压的目录,然后在系统变量path里增加%HADOOP_HOME%\bin 即可。  

java.io.IOException: Could not locate executable null\bin\winutils.exe in the Hadoop binaries._第2张图片

java.io.IOException: Could not locate executable null\bin\winutils.exe in the Hadoop binaries._第3张图片


再次运行程序,即可正常执行。

java.io.IOException: Could not locate executable null\bin\winutils.exe in the Hadoop binaries._第4张图片


你可能感兴趣的:(scala,hadoop,windows,path,spark,spark,scala)