YarnapplicationhasalreadyexitedwithstateFINISHED

一見藍天發表於2016-10-13
如果在執行spark-sql時遇到如下這樣的錯誤,可能是因為yarn-site.xml中的配置項yarn.nodemanager.vmem-pmem-ratio值偏小,它的預設值為2.1,可以嘗試改大一點再試。

ERROR cluster.YarnClientSchedulerBackend: Yarn application has already exited with state FINISHED!

16/10/13 10:23:19 ERROR client.TransportClient: Failed to send RPC 7614640087981520382 to /10.143.136.231:34800: java.nio.channels.ClosedChannelException

java.nio.channels.ClosedChannelException

16/10/13 10:23:19 ERROR cluster.YarnSchedulerBackend$YarnSchedulerEndpoint: Sending RequestExecutors(0,0,Map()) to AM was unsuccessful

java.io.IOException: Failed to send RPC 7614640087981520382 to /10.143.136.231:34800: java.nio.channels.ClosedChannelException

        at org.apache.spark.network.client.TransportClient$3.operationComplete(TransportClient.java:249)

        at org.apache.spark.network.client.TransportClient$3.operationComplete(TransportClient.java:233)

        at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:680)

        at io.netty.util.concurrent.DefaultPromise$LateListeners.run(DefaultPromise.java:845)

        at io.netty.util.concurrent.DefaultPromise$LateListenerNotifier.run(DefaultPromise.java:873)

        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:357)

        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357)

        at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:111)

        at java.lang.Thread.run(Thread.java:745)