21/08/15 22:38:58 WARN Shell: Did not find winutils.exe: {}
java.io.FileNotFoundException: Could not locate Hadoop executable: D:\main\hadoop-3.1.3\bin\winutils.exe -see https://wiki.apache.org/hadoop/WindowsProblems
at org.apache.hadoop.util.Shell.getQualifiedBinInner(Shell.java:620)
at org.apache.hadoop.util.Shell.getQualifiedBin(Shell.java:593)
at org.apache.hadoop.util.Shell.(Shell.java:690)
at org.apache.hadoop.util.StringUtils.(StringUtils.java:78)
解决方法:
根据hadoop版本,下载winutils.exe、hadoop.dll文件到windows上的hadoop目录的bin文件夹中
我是在github上搜索找到的文件,
地址:https://github.com/tigerLuHai/hadoop-3.1.2
在系统环境变量中添加HADOOP_HOME
在path变量中新增%HADOOP_HOME%\bin
运行成功!
参考资料:
https://blog.youkuaiyun.com/HeyShHeyou/article/details/103441110
https://blog.youkuaiyun.com/love666666shen/article/details/78812622