Hadoop没有与resourcemanager通信

时间:2014-09-06 00:41:20

标签: hadoop

嗨,目前我正在运行hadoop 2.4.1。我使用eclipse创建了一个简单的java程序DefaultMapperClass.java并将其打包成ex1.jar

当我尝试使用命令

通过hadoop shell调用此程序时
**hadoop jar /home/Maddy/ex1.jar DefaultMapperClass hdfs://localhost/users/root/input/Hadoop.txt hdfs://localhost/users/root/output**

我在hadoop shell中获得了以下输出

**[root@localhost Maddy]# hadoop jar /home/Maddy/ex1.jar DefaultMapperClass hdfs://localhost/users/root/input/Hadoop.txt hdfs://localhost/users/root/output
14/09/05 19:26:35 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Job started: Fri Sep 05 19:26:35 CDT 2014
14/09/05 19:26:35 INFO client.RMProxy: Connecting to ResourceManager at localhost/127.0.0.1:8032
[root@localhost Maddy]#** 

似乎hadoop shell正在尝试连接资源管理器但不成功但没有错误消息

mapred-site.xml文件:

**<configuration>
    <property>
        <name>mapreduce.framework.name</name>
        <value>yarn</value>
    </property>
</configuration>**

纱-site.xml中:

**<configuration>
    <property>
        <name>yarn.nodemanager.aux-services</name>
        <value>mapreduce_shuffle</value>
    </property>
<property>
  <name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name>
  <value>org.apache.hadoop.mapred.ShuffleHandler</value>
 </property>
<property>
<name>yarn.resourcemanager.address</name>
<value>localhost:8032</value>
</property>
<property>
<name>yarn.resourcemanager.scheduler.address</name>
<value>localhost:8030</value>
</property>
<property>
<name>yarn.resourcemanager.resource-tracker.address</name>
<value>localhost:8031</value>
</property>
</configuration>**

这里缺少什么?尝试连接资源管理器后为什么要终止执行?

1 个答案:

答案 0 :(得分:0)

我建议从yarnsite.xml删除以下配置,因为它们是不必要的:

<property>
<name>yarn.resourcemanager.address</name>
<value>localhost:8032</value>
</property>
<property>
<name>yarn.resourcemanager.scheduler.address</name>
<value>localhost:8030</value>
</property>
<property>
<name>yarn.resourcemanager.resource-tracker.address</name>
<value>localhost:8031</value>
</property>

您可以访问localhost:8088

中的资源管理器