当前位置:网站首页>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算子运行成功。
边栏推荐
- php中计算树状结构数据中的合计
- 20201002 vs 2019 qt5.14 developed program packaging
- SQLI-LABS通關(less6-less14)
- How to try catch statements that return promise objects in JS
- Common function writing method and set get writing method for calculating attributes
- 由于不正常断电导致的unexpected inconsistency;RUN fsck MANUALLY问题已解决
- js判断对象是否为空
- 由於不正常斷電導致的unexpected inconsistency;RUN fsck MANUALLY問題已解决
- 2021-07-17C#/CAD二次开发创建圆(5)
- Latex 报错 LaTeX Error: The font size command \normalsize is not defined问题解决
猜你喜欢
CTF web practice competition
Sqli-labs customs clearance (less18-less20)
apt命令报证书错误 Certificate verification failed: The certificate is NOT trusted
Win10桌面图标没有办法拖动(可以选中可以打开可以删除新建等操作但是不能拖动)
No process runs when querying GPU, but the video memory is occupied
Basic knowledge of software testing
QQ email cannot receive the email sent by Jenkins using email extension after construction (timestamp or auth...)
Pytest (2) mark function
sqli-labs通关汇总-page4
How to debug wechat built-in browser applications (enterprise number, official account, subscription number)
随机推荐
SQLI-LABS通关(less1)
AWD learning
Atcoder beginer contest 253 F - operations on a matrix / / tree array
Latex error: the font size command \normalsize is not defined problem solved
(the 100th blog) written at the end of the second year of doctor's degree -20200818
Review of reflection topics
Redis -- cache breakdown, penetration, avalanche
Sqli-labs customs clearance (less6-less14)
Go common compilation fails
PIP install
UEditor . Net version arbitrary file upload vulnerability recurrence
UEditor .Net版本任意文件上传漏洞复现
由於不正常斷電導致的unexpected inconsistency;RUN fsck MANUALLY問題已解决
Latex warning: citation "*****" on page y undefined on input line*
The table component specifies the concatenation parallel method
Wechat applet Foundation
JS delete the last bit of the string
Use of interrupt()
Build learning tensorflow
table 组件指定列合并行方法