火花提交作业不适用于群集模式

时间:2019-05-07 21:41:12

标签: python apache-spark hadoop

我正在尝试在集群模式下使用spark-submit执行python文件。有人可以建议我做那件事之前给我做些什么吗?

我尝试将master用作纱线,并且在没有群集模式的情况下运行良好。

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

纱线日志:

  

应用程序application_1557254378595_0020失败了两次,原因是退出了appattempt_1557254378595_0020_000002的AM容器,   exitCode:13尝试失败。诊断:[2019-05-07   22:20:22.422]容器启动时发生异常。容器编号:   container_1557254378595_0020_02_000001退出代码:13 [2019-05-07   22:20:22.424]容器退出,退出代码为非零13。错误   文件:prelaunch.err。 prelaunch.err的后4096个字节:前4096个   stderr的字节数:19/05/07 22:20:21错误   org.apache.spark.deploy.yarn.ApplicationMaster:用户应用程序   退出,状态为1 19/05/07 22:20:21错误   org.apache.spark.deploy.yarn.ApplicationMaster:未捕获的异常:   org.apache.spark.SparkException:在awaitResult中引发的异常:at   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 $ run $ 2.apply $ mcV $ sp(ApplicationMaster.scala:260)   在   org.apache.spark.deploy.yarn.ApplicationMaster $$ anonfun $ run $ 2.apply(ApplicationMaster.scala:260)   在   org.apache.spark.deploy.yarn.ApplicationMaster $$ anonfun $ run $ 2.apply(ApplicationMaster.scala:260)   在   org.apache.spark.deploy.yarn.ApplicationMaster $$ anon $ 5.run(ApplicationMaster.scala:815)   在java.security.AccessController.doPrivileged(本机方法)在   javax.security.auth.Subject.doAs(Subject.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:用户应用程序   在1退出   org.apache.spark.deploy.PythonRunner $ .main(PythonRunner.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(Method.java:498)在   org.apache.spark.deploy.yarn.ApplicationMaster $$ anon $ 4.run(ApplicationMaster.scala:721)

0 个答案:

没有答案