<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="configuration.xsl"?><!-- Put site-specific property overrides in this file. --><configuration><property><name>fs.default.name</name><value>hdfs://h01:9000</value></property><property><name>fs.defaultFS</name><value>hdfs://h01:8020</value></property><property><name>hadoop.tmp.dir</name><value>/home/hadoop3/hadoop/tmp</value></property><property><name>hadoop.http.staticuser.user</name><value>root</value></property><property><name>hadoop.proxyuser.root.hosts</name><value>*</value></property><property><name>hadoop.proxyuser.root.groups</name><value>*</value></property></configuration>
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="configuration.xsl"?><!-- Put site-specific property overrides in this file. --><configuration><property><name>dfs.replication</name><value>2</value></property><property><name>dfs.namenode.name.dir</name><value>/home/hadoop3/hadoop/hdfs/name</value></property><property><name>dfs.namenode.data.dir</name><value>/home/hadoop3/hadoop/hdfs/data</value></property><property><name>dfs.namenode.http-address</name><value>h01:9870</value></property><property><name>dfs.namenode.secondary.http-address</name><value>h03:9868</value></property></configuration>
mapred-site.xml
1
2
3
4
5
6
7
8
9
<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="configuration.xsl"?><!-- Put site-specific property overrides in this file. --><configuration><property><name>mapreduce.framework.name</name><value>yarn</value></property></configuration>
workers
这里演示 3 个节点
1
2
3
h01
h02
h03
yarn-site.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?xml version="1.0"?><configuration><!-- Site specific YARN configuration properties --><property><name>yarn.nodemanager.aux-services</name><value>mapreduce_shuffle</value></property><property><name>yarn.resourcemanager.hostname</name><value>h02</value></property><property><name>yarn.nodemanager.env-whitelist</name><value>JAVA_HOME,HADOOP_COMMON_HOME,HADOOP_HDFS_HOME,HADOOP_CONF_DIR,CLASSPATH_PREPEND_DISTCACHE,HADOOP_YARN_HOME,HADOOP_MAPRED_HOME</value></property></configuration>