Java – Yarn MapReduce job died from strange messages

Yarn MapReduce job died from strange messages… here is a solution to the problem.

Yarn MapReduce job died from strange messages

I

have a Hadoop-Yarn cluster and when I try to run the hadoop example I get a strange error message in the container logs:

Error: Could not find or load main class 1638

My version of Java is:

java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)

Run the service on master:

593 NodeManager
373 SecondaryNameNode
745 JobHistoryServer
507 ResourceManager
129 NameNode
240 DataNode

Run the service on slave:

51 DataNode
136 NodeManager
351 Jps

I execute the following command:

bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.6.0.jar grep input/hadoop output 'dfs[a-z.] +'

And get this exception:

15/05/13 13:35:31 INFO mapreduce. Job: Running job: job_1431538391289_0005
15/05/13 13:35:37 INFO mapreduce. Job: Job job_1431538391289_0005 running in uber mode : false
15/05/13 13:35:37 INFO mapreduce. Job: map 0% reduce 0%
15/05/13 13:35:37 INFO mapreduce. Job: Job job_1431538391289_0005 failed with state FAILED due to: Application application_1431538391289_0005 failed 2 times due to AM Container for appattempt_1431538391289_0005_000002 exited with exitCode: 1
For more detailed output, check application tracking page:http://namenode:8088/proxy/application_1431538391289_0005/Then, click on links to logs of each attempt.
Diagnostics: Exception from container-launch.
Container id: container_1431538391289_0005_02_000001
Exit code: 1
Stack trace: ExitCodeException exitCode=1: 
at org.apache.hadoop.util.Shell.runCommand(Shell.java:538)
at org.apache.hadoop.util.Shell.run(Shell.java:455)
at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:715)
at org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor.launchContainer(DefaultContainerExecutor.java:211)
at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:302)
at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:82)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)

Can you help me with this

Solution

Replace

<property>
    <name>yarn.app.mapreduce.am.command-opts</name>
    <value>819</value>
</property>

Need

<property>
    <name>yarn.app.mapreduce.am.command-opts</name>
    <value>-Xmx819m</value>
</property>

Related Problems and Solutions