我正在尝试使用spark submit on cluster模式执行python文件。有人能建议我在做那件事之前应该做些什么吗?
我已经试过大师为纱,没有集群模式它运行良好。 test_cluster.py
:
from pyspark.sql import SparkSession
spark=
SparkSession.builder().appName("test").master("yarn").getOrCreate()
执行命令:
spark-submit --master yarn --deploy-mode cluster test_cluster.py
Yarn原木:
应用程序应用程序\u 1557254378595 \u 0020失败2次,原因是appattempt的am容器\u 1557254378595 \u 0020 \u000002退出,退出代码:13此尝试失败。诊断:[2019-05-07 22:20:22.422]容器启动异常。集装箱id:container\u 1557254378595\u 0020\u 02\u000001出口代码:13[2019-05-07 22:20:22.424]集装箱出口代码非零13。错误文件:prelaunch.err。prelaunch.err的最后4096个字节:stderr的最后4096个字节:19/05/07 22:20:21 error org.apache.spark.deploy.yarn.applicationmaster:用户应用程序退出,状态为1 19/05/07 22:20:21 error org.apache.spark.deploy.yarn.applicationmaster:未捕获异常:org.apache.spark.sparkeexception:在中引发异常结果:在org.apache.spark.util.threadutils$.awaitresult(threadutils。scala:205)位于org.apache.spark.deploy.yarn.applicationmaster.rundriver(applicationmaster。scala:498)在org.apache.spark.deploy.yarn.applicationmaster.org$apache$spark$deploy$yarn$applicationmaster$$runimpl(applicationmaster)。scala:345)在org.apache.spark.deploy.yarn.applicationmaster$$anonfun$运行$2.apply$mcv$sp(applicationmaster。scala:260)在org.apache.spark.deploy.yarn.applicationmaster$$anonfun$上运行$2.apply(applicationmaster。scala:260)在org.apache.spark.deploy.yarn.applicationmaster$$anonfun$上运行$2.apply(applicationmaster。scala:260)在org.apache.spark.deploy.yarn.applicationmaster$$anon$5.run(applicationmaster。scala:815)位于javax.security.auth.subject.doas(subject)的java.security.accesscontroller.doprivileged(本机方法)。java:422)在org.apache.hadoop.security.usergroupinformation.doas(usergroupinformation。java:1893)在org.apache.spark.deploy.yarn.applicationmaster.doasuser(applicationmaster。scala:814)在org.apache.spark.deploy.yarn.applicationmaster.run(applicationmaster。scala:259)在org.apache.spark.deploy.yarn.applicationmaster$.main(applicationmaster。scala:839)在org.apache.spark.deploy.yarn.applicationmaster.main(applicationmaster.scala)上,由以下原因引起:org.apache.spark.sparkuserappexception:用户应用程序在org.apache.spark.deploy.pythonrunner$.main(pythonrunner)以1退出。scala:106)位于org.apache.spark.deploy.pythonrunner.main(pythonrunner.scala),位于sun.reflect.nativemethodaccessorimpl.invoke0(本机方法),位于sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl)。java:62) 在sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl。java:43)在java.lang.reflect.method.invoke(方法。java:498)在org.apache.spark.deploy.yarn.applicationmaster$$anon$4.run(applicationmaster。scala:721)
暂无答案!
目前还没有任何答案,快来回答吧!