Hi,
I was trying to launch simple application in cluster mode using YARN. I followed following steps:
- export YARN_CONF_DIR=/etc/hadoop/conf/
- export HADOOP_CONF_DIR=/etc/hadoop/conf/
- spark-submit --master yarn --class org.apache.spark.examples.SparkPi /usr/hdp/current/spark-client/lib/spark-examples-*.jar 10
After following above steps, I am getting these errors:
18/12/27 12:09:06 INFO TaskSetManager: Finished task 9.0 in stage 0.0 (TID 9) in 18 ms on ip-172-31-20-247.ec2.internal (executor 2) (10/10)
18/12/27 12:09:06 INFO YarnScheduler: Removed TaskSet 0.0, whose tasks have all completed, from pool
18/12/27 12:09:06 INFO DAGScheduler: ResultStage 0 (reduce at SparkPi.scala:36) finished in 5.782 s
18/12/27 12:09:06 INFO DAGScheduler: Job 0 finished: reduce at SparkPi.scala:36, took 5.836619 s
Pi is roughly 3.1412191412191413
18/12/27 12:09:06 INFO SparkUI: Stopped Spark web UI at http://ip-172-31-38-146.ec2.internal:4041
18/12/27 12:09:06 ERROR Client: Failed to contact YARN for application application_1545335729280_1471.
java.io.InterruptedIOException: Call interrupted
at org.apache.hadoop.ipc.Client.getRpcResponse(Client.java:1548)
at org.apache.hadoop.ipc.Client.call(Client.java:1498)
at org.apache.hadoop.ipc.Client.call(Client.java:1398)
at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:233)
at com.sun.proxy.$Proxy15.getApplicationReport(Unknown Source)
at org.apache.hadoop.yarn.api.impl.pb.client.ApplicationClientProtocolPBClientImpl.getApplicationReport(ApplicationClientProtocolPBClientImpl.java:191)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:290)
at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:202)
at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:184)
at com.sun.proxy.$Proxy16.getApplicationReport(Unknown Source)
at org.apache.hadoop.yarn.client.api.impl.YarnClientImpl.getApplicationReport(YarnClientImpl.java:454)
at org.apache.spark.deploy.yarn.Client.getApplicationReport(Client.scala:300)
at org.apache.spark.deploy.yarn.Client.monitorApplication(Client.scala:1124)
at org.apache.spark.scheduler.cluster.YarnClientSchedulerBackend$MonitorThread.run(YarnClientSchedulerBackend.scala:109)
18/12/27 12:09:06 ERROR YarnClientSchedulerBackend: Yarn application has already exited with state FAILED!
What could have happened?