HDFD 四个配置文件(core-site.xml hdfs-site.xml mapred-site.xml yarn-site.xml )的简单介绍

一 core-site.xml
<configuration>
<!--指定namenode的地址-->
        <property>
                <name>fs.defaultFS</name>
                <value>hdfs://master:9000</value>
        </property>
<!--用来指定使用hadoop时产生文件的存放目录--> 
        <property>
                <name>hadoop.tmp.dir</name>
                <value>/home/zkpk/hadoopdata</value>
        </property>


二 hdfs-site.xml

<configuration>
<!--指定hdfs保存数据的副本数量-->
    <property>
            <name>dfs.replication</name>
                    <value>2</value>
                        </property>
      </configuration>


三 mapred-site.xml
<configuration>
<!--告诉hadoop以后MR运行在YARN上-->
        <property>
              <name>mapreduce.framework.name</name>
              <value>yarn</value>
       </property> 
</configuration>
   
四  yarn-site.xml

<configuration>
<!--nomenodeManager获取数据的方式是shuffle-->
        <property>
                <name>yarn.nodemanager.aux-services</name>
                <value>mapreduce_shuffle</value>
        </property>
<!--指定Yarn的老大(ResourceManager)的地址-->     
   <property>
                <name>yarn.resourcemanager.address</name>
                <value>master:18040</value>
         </property>
<configuration>

猜你喜欢

转载自blog.csdn.net/knidly/article/details/80268364