HDFS 四個配置文件(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>

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章