3台机器,start-yarn.sh之后,各个服务都成功启动了,但是Master:8088里的active nodes的数量一直为1.

yarn-site.xml
 <configuration>

    <property>
        <name>yarn.nodemanager.aux-services</name>
        <value>mapreduce_shuffle</value>
        <description>Yarn Node Manager Aux Service</description>
    </property>

    <property>
      <name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name>
      <value>org.apache.hadoop.mapred.ShuffleHandler</value>
    </property>

    <property>
      <name>yarn.nodemanager.local-dirs</name>
      <value>file:///home/hadoopuser/yarn/local</value>
    </property>

    <property>
      <name>yarn.nodemanager.log-dirs</name>
      <value>file:///home/hadoopuser/yarn/logs</value>
    </property> 


    <property>
      <name>yarn.nodemanager.resource.memory-mb</name>
        <value>1536</value>
    </property>
    
    <property>
      <name>yarn.scheduler.maximum-allocation-mb</name>
        <value>1536</value>
    </property>

    <property>
      <name>yarn.scheduler.minimum-allocation-mb</name>
        <value>128</value>
    </property>

    <property>
      <name>yarn.nodemanager.vmem-check-enabled</name>
        <value>false</value>
    </property>

</configuration>
 
hdfs-site.xml
 

<configuration>
   <property>
        <name>dfs.namenode.name.dir</name>
        <value>file:///home/hadoopuser/hdfs/namenode</value>
        <description>NameNode directory for namespace and transaction logs storage.</description>
    </property>

    <property>
        <name>dfs.datanode.data.dir</name>
        <value>file:///home/hadoopuser/hdfs/datanode</value>
        <description>DataNode directory</description>
    </property>

    <property>
        <name>dfs.replication</name>
        <value>2</value>
    </property>

    <property>
        <name>dfs.permissions</name>
        <value>false</value>
    </property>

    <property>
        <name>dfs.datanode.use.datanode.hostname</name>
        <value>false</value>
    </property>

    <property>
        <name>dfs.namenode.datanode.registration.ip-hostname-check</name>
        <value>false</value>
    </property>

</configuration>
 
core-site.xml
 

<configuration>

    <property>
        <name>fs.defaultFS</name>
        <value>hdfs://Master:9820/</value>
        <description>NameNode URI</description>
    </property>

    <property>
      <name>io.file.buffer.size</name>
      <value>131072</value>
      <description>Buffer size</description>
    </property>

    <property>
      <name>hadoop.tmp.dir</name>
      <value>/home/hadoopuser/tmp</value>
    </property>


</configuration>
 
 
mapred-site.xml
 
 
<configuration>
    <property>
        <name>mapreduce.framework.name</name>
        <value>yarn</value>
        <description>MapReduce framework name</description>
    </property>
 
 
    <property>
<name>yarn.app.mapreduce.am.resource.mb</name>
<value>512</value>
    </property>
 
    <property>
<name>mapreduce.map.memory.mb</name>
<value>256</value>
    </property>
 
    <property>
<name>mapreduce.reduce.memory.mb</name>
<value>256</value>
    </property>
 
    <property>
<name>yarn.app.mapreduce.am.env</name>
<value>HADOOP_MAPRED_HOME=$HADOOP_MAPRED_HOME</value>
    </property>
 
    <property>
<name>mapreduce.map.env</name>
<value>HADOOP_MAPRED_HOME=$HADOOP_MAPRED_HOME</value>
    </property>
 
    <property>
<name>mapreduce.reduce.env</name>
<value>HADOOP_MAPRED_HOME=$HADOOP_MAPRED_HOME</value>
    </property>
 
 
</configuration>
 
 
 
2.jpg 3.jpg 1.jpg 4.jpg 5.jpg

要回复问题请先登录注册