首页 > 编程语言> > Win10_spark本地模式报错:Failed to locate the winutils binary in the hadoop binary path java.io.IOException
Win10_spark本地模式报错:Failed to locate the winutils binary in the hadoop binary path java.io.IOException
作者:互联网
当想在Windows上运行Spark本地模式测试代码的时候会报如下错误ERROR 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.
主要是找不到winutils
解决办法:
1.将Windows的hadoop安装介质的zip包解压到本地目录
2.在程序中指定环境变量
def main(args: Array[String]): Unit = {
//!!!注意:如果在Windows上执行,指定Hadoop的Home
System.setProperty("hadoop.home.dir", "D:\\temp\\hadoop-2.4.1\\hadoop-2.4.1")
//程序
}
标签:locate,binary,Windows,hadoop,Hadoop,winutils,报错 来源: https://blog.csdn.net/Muzi_Water/article/details/89312403