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

问题描述 投票:0回答:0

我正在尝试使用 intellij 在 spark-scala 中运行基本程序。当我运行我的代码时,出现以下错误,如“java.io.IOException: Could not locate executable C:\spark in in\ Hadoop 二进制文件中的 winutils.exe。”我尝试了很多东西,但都累了。我有 我一定犯了一个基本错误,但无法弄清楚它是什么。我已经下载了“spark-3.3.1-bin-hadoop2.tgz”,我已经从 hadoop-2.7.1 下载了 winutils.exe

enter image description here。这是我的基本 spark scala 代码

enter image description here这是我的错误

我已经尝试了一切,比如交叉检查环境变量。因为我在我的 spark-scala 应用程序中硬编码了 winutils.exe 的路径。但我无法找出错误。我附上了下面的所有屏幕截图,请查看它.enter image description here 这是我的文件夹,其中存在 winutils.exe (https://i.stack.imgur.com/41gWa.png) (https://i.stack.imgur.com/I8aOr.png) enter image description here enter image description here 我从这里下载了 winutils.exe hadoop-2.7.1

scala apache apache-spark hadoop intellij-idea
© www.soinside.com 2019 - 2024. All rights reserved.