当前位置:网站首页>IDEA2020中测试PySpark的运行出错
IDEA2020中测试PySpark的运行出错
2022-07-02 06:23:00 【wuzd】
项目环境:
Windows: Idea2020
JDK: java version "1.8.0_231"
Python: 3.8.3
spark:spark-3.2.1-bin-hadoop2.7.tgz
以前有hadoop2.7的环境,故使用的Spark3是基于hadoop2.7的。
问题描述
IDEA中测试PySpark的Map算子,出错Message
py4j.protocol.Py4JJavaError: An error occurred while calling z:org.apache.spark.api.python.PythonRDD.collectAndServe.
: org.apache.spark.SparkException: Job aborted due to stage failure: Task 1 in stage 0.0 failed 1 times,
most recent failure: Lost task 1.0 in stage 0.0 (TID 1) (XXXX.mshome.net executor driver):
java.io.IOException: Cannot run program "python3": CreateProcess error=2, 系统找不到指定的文件
详细错误信息:
py4j.protocol.Py4JJavaError: An error occurred while calling z:org.apache.spark.api.python.PythonRDD.collectAndServe.
: org.apache.spark.SparkException: Job aborted due to stage failure: Task 1 in stage 0.0 failed 1 times, most recent failure: Lost task 1.0 in stage 0.0 (TID 1) (E490.mshome.net executor driver):
java.io.IOException: Cannot run program "python3": CreateProcess error=2, 系统找不到指定的文件。
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at org.apache.spark.api.python.PythonWorkerFactory.createSimpleWorker(PythonWorkerFactory.scala:166)
at org.apache.spark.api.python.PythonWorkerFactory.create(PythonWorkerFactory.scala:108)
at org.apache.spark.SparkEnv.createPythonWorker(SparkEnv.scala:121)
at org.apache.spark.api.python.BasePythonRunner.compute(PythonRunner.scala:162)
at org.apache.spark.api.python.PythonRDD.compute(PythonRDD.scala:65)
at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:373)
at org.apache.spark.rdd.RDD.iterator(RDD.scala:337)
at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:90)
at org.apache.spark.scheduler.Task.run(Task.scala:131)
at org.apache.spark.executor.Executor$TaskRunner.$anonfun$run$3(Executor.scala:506)
at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1462)
at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:509)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: CreateProcess error=2, 系统找不到指定的文件。
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:444)
at java.lang.ProcessImpl.start(ProcessImpl.java:140)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 15 more
对策
Python的安装目录里面复制python.exe,并改名为python3.exe
Spark的Map算子运行成功。
边栏推荐
- 默认google浏览器打不开链接(点击超链接没有反应)
- 在php的开发环境中如何调取WebService?
- Atcoder beginer contest 253 F - operations on a matrix / / tree array
- 20201002 vs 2019 qt5.14 developed program packaging
- Linux MySQL 5.6.51 community generic installation tutorial
- php中在二维数组中根据值返回对应的键值
- Recursion (maze problem, Queen 8 problem)
- CVE-2015-1635(MS15-034 )遠程代碼執行漏洞複現
- Pytest (2) mark function
- php中生成随机的6位邀请码
猜你喜欢
Usage of map and foreach in JS
CVE-2015-1635(MS15-034 )遠程代碼執行漏洞複現
在php的开发环境中如何调取WebService?
PgSQL learning notes
Sqli-labs customs clearance (less6-less14)
Latex在VSCODE中编译中文,使用中文路径问题解决
20201002 vs 2019 qt5.14 developed program packaging
Explanation and application of annotation and reflection
VSCODE 安装LATEX环境,参数配置,常见问题解决
sqli-labs通关汇总-page3
随机推荐
Common prototype methods of JS array
js创建一个自定义json数组
Sqli labs customs clearance summary-page4
Differences between ts and JS
SQLI-LABS通关(less6-less14)
sqli-labs通关汇总-page2
Sqli labs customs clearance summary-page3
蚂蚁集团g6初探
QQ email cannot receive the email sent by Jenkins using email extension after construction (timestamp or auth...)
Basic knowledge of software testing
查询GPU时无进程运行,但是显存却被占用了
sqli-labs通关汇总-page3
Redis -- cache breakdown, penetration, avalanche
VSCODE 安装LATEX环境,参数配置,常见问题解决
Win10: add or delete boot items, and add user-defined boot files to boot items
Improve user experience defensive programming
No process runs when querying GPU, but the video memory is occupied
Browser scrolling for more implementations
Apt command reports certificate error certificate verification failed: the certificate is not trusted
Unexpected inconsistency caused by abnormal power failure; Run fsck manually problem resolved