windows运行saprk程序:Did not find winutils.exe、Could not locate Hadoop executable:

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)

windows运行saprk程序:Did not find winutils.exe、Could not locate Hadoop executable:_第1张图片

解决方法:
根据hadoop版本,下载winutils.exe、hadoop.dll文件到windows上的hadoop目录的bin文件夹中
我是在github上搜索找到的文件,
地址:https://github.com/tigerLuHai/hadoop-3.1.2
windows运行saprk程序:Did not find winutils.exe、Could not locate Hadoop executable:_第2张图片
在系统环境变量中添加HADOOP_HOME
windows运行saprk程序:Did not find winutils.exe、Could not locate Hadoop executable:_第3张图片
在path变量中新增%HADOOP_HOME%\bin
windows运行saprk程序:Did not find winutils.exe、Could not locate Hadoop executable:_第4张图片
运行成功!
windows运行saprk程序:Did not find winutils.exe、Could not locate Hadoop executable:_第5张图片

参考资料:
https://blog.csdn.net/HeyShHeyou/article/details/103441110

https://blog.csdn.net/love666666shen/article/details/78812622

你可能感兴趣的:(Spark)