我正在尝试运行一个简单的spark Java应用程序。我可以通过群集中的spark提交来运行应用程序
我的job.properties文件如下:
nameNode=hdfs://auper01-01-20-01-0.prod.vroc.com.au:8020
jobTracker=auper01-02-10-01-0.prod.vroc.com.au:8050
master=yarn-cluster
queueName=default
#examplesRoot=examples
oozie.use.system.libpath=true
oozie.wf.application.path=${nameNode}/user/livy
oozie.libpath=${nameNode}/user/oozie/share/lib/lib_20161001110339/spark
workflow.xml文件位于我的(user / livy)目录中,我还将我的应用程序jar上传到该目录,以避免因为提交spark而没有获得classfound体验,文件如下:
<workflow-app xmlns='uri:oozie:workflow:0.5' name='SparkExample'>
<start to='spark-node' />
<action name='spark-node'>
<spark xmlns="uri:oozie:spark-action:0.1">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<master>${master}</master>
<name>Spark-Oozie</name>
<class>au.com.vroc.mdm.SimpleApp</class>
<jar>${nameNode}/tmp/simple-project/mdm-mahdi.jar</jar>
</spark>
<ok to="end" />
<error to="fail" />
</action>
<kill name="fail">
<message>Workflow failed, error
message[${wf:errorMessage(wf:lastErrorNode())}]
</message>
</kill>
<end name='end' />
</workflow-app>
我可以成功地启动oozie并获取应用程序ID,当我去oozie日志时,我的火花日志有以下异常
2017-05-26 16:51:01,880 ERROR [main] org.apache.hadoop.mapreduce.v2.app.MRAppMaster: Error starting MRAppMaster
java.lang.IllegalArgumentException: Invalid ContainerId: container_e20_1489119643653_0943_02_000001
at org.apache.hadoop.yarn.util.ConverterUtils.toContainerId(ConverterUtils.java:182)
at org.apache.hadoop.mapreduce.v2.app.MRAppMaster.main(MRAppMaster.java:1343)
Caused by: java.lang.NumberFormatException: For input string: "e20"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Long.parseLong(Long.java:589)
at java.lang.Long.parseLong(Long.java:631)
at org.apache.hadoop.yarn.util.ConverterUtils.toApplicationAttemptId(ConverterUtils.java:137)
at
org.apache.hadoop.yarn.util.ConverterUtils.toContainerId(ConverterUtils.java:177)
... 1 more
不确定为什么我会遇到上述错误,任何帮助都会得到赞赏。