hadoop distributed configuration file

1. Configure hadoop-env.sh:

export JAVA_HOME=/usr/lib/jvm/jdk1.8.201

2. Configure core-site.xml file:

<! - Specify the file system used by hadoop schema (URL), HDFS boss (NameNode) address ->

<property>

<name>fs.defaultFS</name>

<value>hdfs://master1:9000</value>

</property>

<! - generated when designated hadoop run the file storage directory ->

<property>

<name>hadoop.tmp.dir</name>

<value>/usr/local/hadoop/tmp</value>

</property>

3. Configure hdfs-site.xml file:

 <! - Specifies the number of copies HDFS ->

<property>

<name>dfs.replication</name>

<value>2</value>

</property>

<property>

<name>dfs.namenode.secondary.http-address</name>

<value>master2:50090</value>

</property>

4.mapred-site.xml:

<-! Mr specify runtime framework, designated here on the yarn, the default is local ->

<property>

<name>mapreduce.framework.name</name>

<value>yarn</value>

</property>

5.yarn-site.xml

<! - Specifies the yarn boss (ResourceManager) address ->

<property>

<name>yarn.resourcemanager.hostname</name>

<value>master1</value>

</property>

<propety>

<name>yarn.nodemanager.aux-services</name>

<value>mapreduce_shuffle</value>

</property>

6.slaves file, add a node inside the host name:

master1

master2

masters

7. configure the environment variables / etc / profile:

export HADOOP_HOME=/usr/local/hadoop

export HADOOP_CONF_DIR=${HADOOP_HOME}/etc/hadoop

export YARN_HOME=/usr/local/hadoop

export YARN_CONF_DIR=${YARN_HOME}/etc/hadoop

Guess you like

Origin www.cnblogs.com/Zeng02/p/11717728.html