当前位置:网站首页>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算子运行成功。

边栏推荐
- 2020-9-23 use of QT timer qtimer class.
- Vscode installation, latex environment, parameter configuration, common problem solving
- Sentry搭建和使用
- PHP Session原理简析
- apt命令报证书错误 Certificate verification failed: The certificate is NOT trusted
- Go package name
- Utilisation de la carte et de foreach dans JS
- CAD二次开发 对象
- Redis -- cache breakdown, penetration, avalanche
- 由于不正常断电导致的unexpected inconsistency;RUN fsck MANUALLY问题已解决
猜你喜欢

Pytest (2) mark function

sqli-labs通关汇总-page2

20201002 vs 2019 qt5.14 developed program packaging
![[literature reading and thought notes 13] unprocessing images for learned raw denoising](/img/a5/ed26a90b3edd75a37b2e5164f6b7d2.png)
[literature reading and thought notes 13] unprocessing images for learned raw denoising

Sentry搭建和使用

Cve-2015-1635 (ms15-034) Remote Code Execution Vulnerability recurrence

Review of reflection topics

js中map和forEach的用法

sqli-labs通关汇总-page1

Explanation and application of annotation and reflection
随机推荐
Sqli-labs customs clearance (less6-less14)
Implement strstr() II
sqli-labs通关汇总-page3
由于不正常断电导致的unexpected inconsistency;RUN fsck MANUALLY问题已解决
sqli-labs通关汇总-page4
CTF web practice competition
js创建一个自定义json数组
Common prototype methods of JS array
js删除字符串的最后一位
Win10网络图标消失,网络图标变成灰色,打开网络设置闪退等问题解决
CAD二次开发 对象
js判断对象是否为空
Queue (linear structure)
PXC high availability cluster summary
php中在二维数组中根据值返回对应的键值
JS to determine whether there is a value in the object in the array
Fe - use of weex development weex UI components and configuration use
Usage of map and foreach in JS
SQL injection closure judgment
SQLI-LABS通关(less6-less14)