错误信息如下:17/05/09 16:07:49 INFO yarn.Client: Application report for application_1494345148426_0004 (state: ACCEPTED)
17/05/09 16:07:50 INFO yarn.Client: Application report for application_1494345148426_0004 (state: ACCEPTED)
17/05/09 16:07:51 INFO yarn.Client: Application report for application_1494345148426_0004 (state: ACCEPTED)
17/05/09 16:07:52 INFO yarn.Client: Application report for application_1494345148426_0004 (state: ACCEPTED)
17/05/09 16:07:53 INFO yarn.Client: Application report for application_1494345148426_0004 (state: ACCEPTED)
17/05/09 16:07:54 INFO yarn.Client: Application report for application_1494345148426_0004 (state: ACCEPTED)
17/05/09 16:07:55 INFO yarn.Client: Application report for application_1494345148426_0004 (state: ACCEPTED)
17/05/09 16:07:56 INFO yarn.Client: Application report for application_1494345148426_0004 (state: FAILED)
17/05/09 16:07:56 INFO yarn.Client:
client token: N/A
diagnostics: Application application_1494345148426_0004 failed 2 times due to AM Container for appattempt_1494345148426_0004_000002 exited with exitCode: -103
For more detailed output, check application tracking page:http://YARN001:8088/cluster/ap ... 4Then, click on links to logs of each attempt.
Diagnostics: Container [pid=1415,containerID=container_1494345148426_0004_02_000001] is running beyond virtual memory limits. Current usage: 134.0 MB of 1 GB physical memory used; 2.1 GB
of 2.1 GB virtual memory used. Killing container.
Dump of the process-tree for container_1494345148426_0004_02_000001 :
|- PID PPID PGRPID SESSID CMD_NAME USER_MODE_TIME(MILLIS) SYSTEM_TIME(MILLIS) VMEM_USAGE(BYTES) RSSMEM_USAGE(PAGES) FULL_CMD_LINE
|- 1415 1413 1415 1415 (bash) 0 0 11440128 661 /bin/bash -c /usr/lib/jvm/java-8-oracle/bin/java -server -Xmx512m -Djava.io.tmpdir=/data/hadoop/yarn/local/usercache/root/appcache/
application_1494345148426_0004/container_1494345148426_0004_02_000001/tmp -Dspark.yarn.app.container.log.dir=/data/hadoop-2.7.3/logs/userlogs/application_1494345148426_0004/container_149
4345148426_0004_02_000001 org.apache.spark.deploy.yarn.ExecutorLauncher --arg '172.17.0.1:33991' --properties-file /data/hadoop/yarn/local/usercache/root/appcache/application_14943451484
26_0004/container_1494345148426_0004_02_000001/__spark_conf__/__spark_conf__.properties 1> /data/hadoop-2.7.3/logs/userlogs/application_1494345148426_0004/container_1494345148426_0004_02
_000001/stdout 2> /data/hadoop-2.7.3/logs/userlogs/application_1494345148426_0004/container_1494345148426_0004_02_000001/stderr
|- 1419 1415 1415 1415 (java) 448 48 2280099840 33635 /usr/lib/jvm/java-8-oracle/bin/java -server -Xmx512m -Djava.io.tmpdir=/data/hadoop/yarn/local/usercache/root/appcache/applic
ation_1494345148426_0004/container_1494345148426_0004_02_000001/tmp -Dspark.yarn.app.container.log.dir=/data/hadoop-2.7.3/logs/userlogs/application_1494345148426_0004/container_149434514
8426_0004_02_000001 org.apache.spark.deploy.yarn.ExecutorLauncher --arg 172.17.0.1:33991 --properties-file /data/hadoop/yarn/local/usercache/root/appcache/application_1494345148426_0004/
container_1494345148426_0004_02_000001/__spark_conf__/__spark_conf__.properties
Container killed on request. Exit code is 143
Container exited with a non-zero exit code 143
Failing this attempt. Failing the application.
ApplicationMaster host: N/A
ApplicationMaster RPC port: -1
queue: default
start time: 1494345982631
final status: FAILED
tracking URL: http://YARN001:8088/cluster/ap ... _0004
user: root
17/05/09 16:07:57 INFO yarn.Client: Deleted staging directory hdfs://hadoop-test/user/root/.sparkStaging/application_1494345148426_0004
17/05/09 16:07:57 ERROR spark.SparkContext: Error initializing SparkContext.
org.apache.spark.SparkException: Yarn application has already ended! It might have been killed or unable to launch application master.
at org.apache.spark.scheduler.cluster.YarnClientSchedulerBackend.waitForApplication(YarnClientSchedulerBackend.scala:85)
at org.apache.spark.scheduler.cluster.YarnClientSchedulerBackend.start(YarnClientSchedulerBackend.scala:62)
at org.apache.spark.scheduler.TaskSchedulerImpl.start(TaskSchedulerImpl.scala:156)
at org.apache.spark.SparkContext.(SparkContext.scala:509)
at org.apache.spark.SparkContext$.getOrCreate(SparkContext.scala:2313)
at org.apache.spark.sql.SparkSession$Builder$$anonfun$6.apply(SparkSession.scala:868)
at org.apache.spark.sql.SparkSession$Builder$$anonfun$6.apply(SparkSession.scala:860)
at scala.Option.getOrElse(Option.scala:121)
at org.apache.spark.sql.SparkSession$Builder.getOrCreate(SparkSession.scala:860)
at org.apache.spark.examples.JavaWordCount.main(JavaWordCount.java:44)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)