Linux下Hadoop配置文件介绍

Hadoop配置文件介绍

1、core-site.xml

<configuration>
        <!--指定namenode的地址-->
    <property>
        <name>fs.defaultFS</name>
        <value>hdfs://master:9000</value>
    </property>
        <!--用来指定使用hadoop时产生文件的存放目录-->
    <property>
        <name>hadoop.tmp.dir</name>
        <value>file:///usr/hadoop/hadoop-2.6.0/tmp</value> 
    </property>
        <!--用来设置检查点备份日志的最长时间-->
    <property>
        <name>fs.checkpoint.period</name> 
        <value>3600</value>
    </property>
 </configuration>

2、hdfs-site.xml

<configuration> 
        <!--指定hdfs保存数据的副本数量--> 
    <property> 
        <name>dfs.replication</name> 
        <value>2</value> 
    </property> 
        <!--指定hdfs中namenode的存储位置--> 
    <property> 
        <name>dfs.namenode.name.dir</name> 
        <value>file:/usr/hadoop/hadoop-2.6.0/tmp/dfs/name</value> 
    </property> 
        <!--指定hdfs中datanode的存储位置--> 
    <property> 
        <name>dfs.datanode.data.dir</name> 
        <value>file:/usr/hadoop/hadoop-2.6.0/tmp/dfs/data</value> 
    </property> 
</configuration>

3、mapred-site.xml

<configuration> 
        <!--告诉hadoop以后MR(Map/Reduce)运行在YARN上--> 
    <property> 
        <name>mapreduce.framework.name</name> 
        <value>yarn</value> 
    </property> 
</configuration>

4、yarn-site.xml

<configuration> 
        <!--nomenodeManager获取数据的方式是shuffle--> 
    <property> 
        <name>yarn.nodemanager.aux-services</name> 
        <value>mapreduce_shuffle</value> 
    </property> 
        <!--指定Yarn的老大(ResourceManager)的地址--> 
    <property> 
        <name>yarn.resourcemanager.hostname</name> 
        <value>master</value> 
    </property> 
        <!--Yarn打印工作日志--> 
    <property> 
        <name>yarn.log-aggregation-enable</name> 
        <value>true</value> 
    </property> 
<configuration>

猜你喜欢

转载自blog.csdn.net/qq_42303254/article/details/89026897