Py4JJavaError: An error occurred while calling z:org.apache.spark.api.python.PythonRDD.collectAndSer

news/2024/11/24 4:51:52/

在这里插入图片描述
报错如下:

: org.apache.spark.SparkException: Job aborted due to stage failure: Task 0 in stage 3.0 failed 4 times, most recent failure: Lost task 0.3 in stage 3.0 (TID 19, 192.168.10.103, executor 1): org.apache.spark.SparkException: 
Error from python worker:Traceback (most recent call last):File "/usr/lib64/python2.6/runpy.py", line 104, in _run_module_as_mainloader, code, fname = _get_module_details(mod_name)File "/usr/lib64/python2.6/runpy.py", line 79, in _get_module_detailsloader = get_loader(mod_name)File "/usr/lib64/python2.6/pkgutil.py", line 456, in get_loaderreturn find_loader(fullname)File "/usr/lib64/python2.6/pkgutil.py", line 466, in find_loaderfor importer in iter_importers(fullname):File "/usr/lib64/python2.6/pkgutil.py", line 422, in iter_importers__import__(pkg)File "/opt/module/spark/python/lib/pyspark.zip/pyspark/__init__.py", line 51, in <module>File "/opt/module/spark/python/lib/pyspark.zip/pyspark/context.py", line 31, in <module>File "/opt/module/spark/python/lib/pyspark.zip/pyspark/accumulators.py", line 97, in <module>File "/opt/module/spark/python/lib/pyspark.zip/pyspark/serializers.py", line 71, in <module>File "/opt/module/spark/python/lib/pyspark.zip/pyspark/cloudpickle.py", line 246, in <module>File "/opt/module/spark/python/lib/pyspark.zip/pyspark/cloudpickle.py", line 270, in CloudPicklerNameError: name 'memoryview' is not defined
PYTHONPATH was:/opt/module/spark/python/lib/pyspark.zip:/opt/module/spark/python/lib/py4j-0.10.7-src.zip:/opt/module/spark/jars/spark-core_2.11-2.4.0.jar:/opt/module/spark/python/lib/py4j-0.10.7-src.zip:/opt/module/spark/python:
org.apache.spark.SparkException: No port number in pyspark.daemon's stdoutat org.apache.spark.api.python.PythonWorkerFactory.startDaemon(PythonWorkerFactory.scala:204)at org.apache.spark.api.python.PythonWorkerFactory.createThroughDaemon(PythonWorkerFactory.scala:122)at org.apache.spark.api.python.PythonWorkerFactory.create(PythonWorkerFactory.scala:95)at org.apache.spark.SparkEnv.createPythonWorker(SparkEnv.scala:117)at org.apache.spark.api.python.BasePythonRunner.compute(PythonRunner.scala:108)at org.apache.spark.api.python.PythonRDD.compute(PythonRDD.scala:65)at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)at org.apache.spark.rdd.RDD.iterator(RDD.scala:288)at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:90)at org.apache.spark.scheduler.Task.run(Task.scala:121)at org.apache.spark.executor.Executor$TaskRunner$$anonfun$10.apply(Executor.scala:402)at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1360)at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:408)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)Driver stacktrace:at org.apache.spark.scheduler.DAGScheduler.org$apache$spark$scheduler$DAGScheduler$$failJobAndIndependentStages(DAGScheduler.scala:1887)at org.apache.spark.scheduler.DAGScheduler$$anonfun$abortStage$1.apply(DAGScheduler.scala:1875)at org.apache.spark.scheduler.DAGScheduler$$anonfun$abortStage$1.apply(DAGScheduler.scala:1874)at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)at org.apache.spark.scheduler.DAGScheduler.abortStage(DAGScheduler.scala:1874)at org.apache.spark.scheduler.DAGScheduler$$anonfun$handleTaskSetFailed$1.apply(DAGScheduler.scala:926)at org.apache.spark.scheduler.DAGScheduler$$anonfun$handleTaskSetFailed$1.apply(DAGScheduler.scala:926)at scala.Option.foreach(Option.scala:257)at org.apache.spark.scheduler.DAGScheduler.handleTaskSetFailed(DAGScheduler.scala:926)at org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.doOnReceive(DAGScheduler.scala:2108)at org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.onReceive(DAGScheduler.scala:2057)at org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.onReceive(DAGScheduler.scala:2046)at org.apache.spark.util.EventLoop$$anon$1.run(EventLoop.scala:49)at org.apache.spark.scheduler.DAGScheduler.runJob(DAGScheduler.scala:737)at org.apache.spark.SparkContext.runJob(SparkContext.scala:2061)at org.apache.spark.SparkContext.runJob(SparkContext.scala:2082)at org.apache.spark.SparkContext.runJob(SparkContext.scala:2101)at org.apache.spark.SparkContext.runJob(SparkContext.scala:2126)at org.apache.spark.rdd.RDD$$anonfun$collect$1.apply(RDD.scala:945)at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151)at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:112)at org.apache.spark.rdd.RDD.withScope(RDD.scala:363)at org.apache.spark.rdd.RDD.collect(RDD.scala:944)at org.apache.spark.api.python.PythonRDD$.collectAndServe(PythonRDD.scala:166)at org.apache.spark.api.python.PythonRDD.collectAndServe(PythonRDD.scala)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)at py4j.Gateway.invoke(Gateway.java:282)at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)at py4j.commands.CallCommand.execute(CallCommand.java:79)at py4j.GatewayConnection.run(GatewayConnection.java:238)at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.spark.SparkException: 
Error from python worker:Traceback (most recent call last):File "/usr/lib64/python2.6/runpy.py", line 104, in _run_module_as_mainloader, code, fname = _get_module_details(mod_name)File "/usr/lib64/python2.6/runpy.py", line 79, in _get_module_detailsloader = get_loader(mod_name)File "/usr/lib64/python2.6/pkgutil.py", line 456, in get_loaderreturn find_loader(fullname)File "/usr/lib64/python2.6/pkgutil.py", line 466, in find_loaderfor importer in iter_importers(fullname):File "/usr/lib64/python2.6/pkgutil.py", line 422, in iter_importers__import__(pkg)File "/opt/module/spark/python/lib/pyspark.zip/pyspark/__init__.py", line 51, in <module>File "/opt/module/spark/python/lib/pyspark.zip/pyspark/context.py", line 31, in <module>File "/opt/module/spark/python/lib/pyspark.zip/pyspark/accumulators.py", line 97, in <module>File "/opt/module/spark/python/lib/pyspark.zip/pyspark/serializers.py", line 71, in <module>File "/opt/module/spark/python/lib/pyspark.zip/pyspark/cloudpickle.py", line 246, in <module>File "/opt/module/spark/python/lib/pyspark.zip/pyspark/cloudpickle.py", line 270, in CloudPicklerNameError: name 'memoryview' is not defined

原因:亲,你是不是执行了两次??执行一次就行了哦或者换一个变量名


http://www.ppmy.cn/news/339667.html

相关文章

HP P410 Raid阵列卡开机配置阵列直接安装系统

开机看到提示后按任意键&#xff0c;后才会出现阵列卡的配置界面 根据提示按F8进入ORCA中配置阵列 按F8进入后&#xff0c;点击Create创建。注意创建后会删除原硬盘中的所有的数据。 如果不能直接Creat&#xff0c;那么就点击第二项View查看是否存在了阵列&#xff0c;如果存在…

微星主板Z370M mortar刷新BIOS导致主板MAC地址错误解决方法

事件原因&#xff1a;某一天因为本人浓烈的好奇心&#xff0c;就用微星提供的msi app manager工具中的Live Update6更新了BIOS 事件后果&#xff1a;刷新完BIOS重启电脑&#xff0c;然后我的有线网卡就不好用了&#xff0c;其中用驱动人生&#xff0c;驱动精灵试过无数遍的更新…

使用python批量解压7z格式压缩包

最近下载了许多7z格式的压缩包&#xff0c;但又不想一个个单独的去解压&#xff0c;所以便百度了下python解压压缩包的方法&#xff0c;常见的有导入zipfile模块&#xff0c;我这里用的是使用系统的cmd命令去调用7-zip软件去进行解压缩。 首先到网上下载7-zip软件安装下载地址…

2018 “Z世代”未成年人游戏玩家洞察 | MobData

“Z世代”汹涌来袭&#xff0c;成为游戏行业发展中不可忽视的生力军。随着他们一同到来的还有“防沉迷“风暴&#xff1a;2017年&#xff0c;人民日报多次发表社论直指防未成年人口游戏沉迷&#xff1b;2018年&#xff0c;一系列相应的政策、措施接连落地。 那关于风暴中心的“…

stm32f407驱动20KG 270度舵机

这里写自定义目录标题 前言PWM概述代码讲解舵机原理 前言 在学习的过程中发现&#xff0c;及时复习是一个好的学习习惯&#xff0c;本文记录使用STM32F407ZGT6控制20KG 270度舵机的学习过程&#xff0c;以便日后复习。 PWM概述 脉冲宽度调制(PWM)&#xff0c;是英文“Pulse …

解决z-index不生效

<div class"loginContent"><div class"loginLogo flexCenter left"><img src"../i/loginLogo.png"/></div><!--登录输入区域--><div class"loginRight flexCenter right"><div class"log…

python格式化字符串 时间戳 转 UTC(2023-01-11T16:00:00Z)格式时间

前言&#xff1a;公司前端的时间参数分为两类 一种是时间戳传参&#xff0c;另一种是 2023-01-11T16:00:00Z &#xff08;UTC&#xff09;时间传参,有些脚本需要用到datatime.datatime因此要整理一下相关方法获取时间戳 my_timestamptime.time() print(my_timestamp) # 167349…

记一次黑苹果(Hackintosh)HighSierra10.13.3安装过程

记一次黑苹果&#xff08;Hackintosh&#xff09;HighSierra10.13.3安装过程 部件&#xff1a; 主板&#xff1a;华硕&#xff08;Asus&#xff09;Z270-ACPU&#xff1a;ntel Core i7-7700K Kaby Lake Quad-Core 4.2 GHz LGA 1151内存条&#xff1a;芝奇&#xff08;2 x 8G&…