hadoop2.7.1配置备忘

1、hadoop-env.sh

# 开启自动同步代码,当重启master时,master机器上的hadoop代码同步到各台slaves上
export HADOOP_MASTER=master:$HADOOP_HOME
export HADOOP_SLAVE_SLEEP=0.1
export JAVA_HOME=$JAVA_HOME # 前提是JDK环境变量已配置,chk:echo $JAVA_HOME

2、core-site.xml

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
    <property>
        <name>fs.defaultFS</name>
        <value>hdfs://master:9000</value>
    </property>
</configuration>

3、hdfs-site.xml

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
    <property>
        <name>dfs.namenode.name.dir</name>
        <value>/hadoop/hdfs/namenode</value>
    </property>
    <property>
        <name>dfs.datanode.data.dir</name>
        <value>/hadoop/hdfs/datanode</value>
    </property>
</configuration>

4、mapred-site.xml

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
    <property>
        <name>mapreduce.framework.name</name>
        <value>yarn</value>
    </property>
</configuration>

5、yarn-site.xml

<?xml version="1.0"?>
<configuration>
   <property>
        <name>yarn.resourcemanager.scheduler.address</name>
        <value>master:8030</value>
   </property>
   <property>
        <name>yarn.resourcemanager.resource-tracker.address</name>
        <value>master:8031</value>
   </property>
   <property>
        <name>yarn.resourcemanager.address</name>
        <value>master:8032</value>
   </property>
   <property>
        <name>yarn.nodemanager.aux-services</name>
        <value>mapreduce_shuffle</value>
    </property>
</configuration>

6、slaves

slave1


你可能感兴趣的:(hadoop2.7.1配置备忘)