问题
I am working on hadoop2.7.0 single node cluster with 4GB Ram and 40 GB HDD. While executing a word count example on Map reduce , it stopped after Running job...I've tried increasing the memory for container in yarn-site but still no luck.
Error
16/11/20 17:05:03 INFO client.RMProxy: Connecting to ResourceManager at /0.0.0.0:8032
16/11/20 17:05:07 INFO input.FileInputFormat: Total input paths to process : 1
16/11/20 17:05:08 INFO mapreduce.JobSubmitter: number of splits:1
16/11/20 17:05:08 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1479631325160_0002
16/11/20 17:05:09 INFO impl.YarnClientImpl: Submitted application application_1479631325160_0002
16/11/20 17:05:09 INFO mapreduce.Job: The url to track the job: http://localhost:8088/proxy/application_1479631325160_0002/
16/11/20 17:05:09 INFO mapreduce.Job: Running job: job_1479631325160_0002
This link shows :
YarnApplicationState: ACCEPTED: waiting for AM container to be allocated, launched and register with RM.
hdfs-site.xml
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>dfs.name.dir</name>
<value>/nn1</value>
</property>
<property>
<name>dfs.data.dir</name>
<value>/dn1</value>
</property>
</configuration>
core-site.xml
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:9000</value>
</property>
</configuration>
mapred-site.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
<property>
<name>mapreduce.job.reduces</name>
<value>1</value>
</property>
<property>
<name>yarn.app.mapreduce.am.resource.mb</name>
<value>512</value>
</property>
<property>
<name>yarn.app.mapreduce.am.command-opts</name>
<value>-Xmx410m</value>
</property>
<property>
<name>mapreduce.map.memory.mb</name>
<value>256</value>
</property>
<property>
<name>mapreduce.reduce.memory.mb</name>
<value>2048</value>
</property>
<property>
<name>mapreduce.map.java.opts</name>
<value>-Xmx204m</value>
</property>
<property>
<name>mapreduce.reduce.java.opts</name>
<value>-Xmx410m</value>
</property>
</configuration>
yarn-site.xml
<?xml version="1.0"?>
<configuration>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<property>
<name>yarn.scheduler.minimum-allocation-mb</name>
<value>256</value>
</property>
<property>
<name>yarn.scheduler.maximum-allocation-mb</name>
<value>2048</value>
</property>
<property>
<name>yarn.nodemanager.resource.memory-mb</name>
<value>2048</value>
</property>
</configuration>
Please tell me how to fix this.
来源:https://stackoverflow.com/questions/40703676/accepted-waiting-for-am-container-to-be-allocated-launched-and-register-with-r