1、core-site.xml
<configuration>
<property>
<name>fs.default.namenode</name>
<value>hdfs://172.16.100.34:9000</value>
</property>
<property>
<name>hadoop.tmp.dir</name>
<value>/opt/data/tmp</value>
</property>
</configuration>
2、hdfs-site.xml
<configuration>
<property>
<name>dfs.replication</name>
<value>2</value>
</property>
<property>
<name>dfs.permissions</name>
<value>false</value>
</property>
<property>
<name>dfs.name.dir</name>
<value>/opt/data/input</value>
</property>
</configuration>
3、mapred-site.xml
<configuration>
<property>
<name>mapred.job.tracker</name>
<value>http://172.16.100.34:9001</value>
</property>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
<property>
<name>mapreduce.application.classpath</name>
<value>/opt/modules/hadoop-3.0.0-alpha4/etc/hadoop,
/opt/modules/hadoop-3.0.0-alpha4/share/hadoop/common/*,
/opt/modules/hadoop-3.0.0-alpha4/share/hadoop/common/lib/*,
/opt/modules/hadoop-3.0.0-alpha4/share/hadoop/hdfs/*,
/opt/modules/hadoop-3.0.0-alpha4/share/hadoop/hdfs/lib/*,
/opt/modules/hadoop-3.0.0-alpha4/share/hadoop/mapreduce/*,
/opt/modules/hadoop-3.0.0-alpha4/share/hadoop/mapreduce/lib/*,
/opt/modules/hadoop-3.0.0-alpha4/share/hadoop/yarn/*,
/opt/modules/hadoop-3.0.0-alpha4/share/hadoop/yarn/lib/*
</value>
</property>
</configuration>