标签:head jdk clust eve 执行 cmd dock 集群 res
Hadoop 2.7.7
角色分配 | NN | DN | SNN |
---|---|---|---|
cluster-master | 是 | 否 | 否 |
cluster-slave1 | 否 | 是 | 是 |
cluster-slave1 | 否 | 是 | 否 |
cluster-slave1 | 否 | 是 | 否 |
docker cp hadoop-2.7.7.tar.gz cluster-master:/root/tar
tar xivf hadoop-2.7.7.tar.gz -C /opt/hadoop
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://jinbill</value>
</property>
<property>
<name>ha.zookeeper.quorum</name>
<value>cluster-master:2181</value>
</property>
<property>
<name>hadoop.tmp.dir</name>
<value>/opt/hadoop</value>
</property>
</configuration>
<configuration>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<property>
<name>yarn.resourcemanager.ha.enabled</name>
<value>true</value>
</property>
<property>
<name>yarn.resourcemanager.cluster-id</name>
<value>mr_jinbill</value>
</property>
<property>
<name>yarn.resourcemanager.ha.rm-ids</name>
<value>rm1,rm2</value>
</property>
<property>
<name>yarn.resourcemanager.hostname.rm1</name>
<value>cluster-slave2</value>
</property>
<property>
<name>yarn.resourcemanager.hostname.rm2</name>
<value>cluster-slave3</value>
</property>
<property>
<name>yarn.resourcemanager.zk-address</name>
<value>192.168.11.46:12181</value>
</property>
<property>
<name>yarn.nodemanager.pmem-check-enabled</name>
<value>false</value>
</property>
<property>
<name>yarn.nodemanager.vmem-check-enabled</name>
<value>false</value>
</property>
</configuration>
export JAVA_HOME=/opt/jdk/jdk1.8.0_221
<configuration>
<property>
<name>dfs.nameservices</name>
<value>jinbill</value>
</property>
<property>
<name>dfs.ha.namenodes.jinbill</name>
<value>nn1,nn2</value>
</property>
<property>
<name>dfs.namenode.rpc-address.jinbill.nn1</name>
<value>cluster-master:8020</value>
</property>
<property>
<name>dfs.namenode.rpc-address.jinbill.nn2</name>
<value>cluster-slave1:8020</value>
</property>
<property>
<name>dfs.namenode.http-address.shsxt.nn1</name>
<value>cluster-master:50070</value>
</property>
<property>
<name>dfs.namenode.http-address.shsxt.nn2</name>
<value>cluster-slave1:50070</value>
</property>
<property>
<name>dfs.namenode.shared.edits.dir</name>
<value>qjournal://cluster-slave1:8485;cluster-slave2:8485;cluster-slave3:8485/jinbill</value>
</property>
<property>
<name>dfs.client.failover.proxy.provider.jinbill</name>
<value>org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider
</value>
</property>
<property>
<name>dfs.ha.fencing.methods</name>
<value>sshfence</value>
</property>
<property>
<name>dfs.ha.fencing.ssh.private-key-files</name>
<value>/root/.ssh/id_rsa</value>
</property>
<property>
<name>dfs.journalnode.edits.dir</name>
<value>/opt/hadoop/data</value>
</property>
<property>
<name>dfs.ha.automatic-failover.enabled</name>
<value>true</value>
</property>
</configuration>
cluster-slave1
cluster-slave2
cluster-slave3
hadoop-daemon.sh start journalnode
hdfs namenode -forma
scp /opt/zookeeper/dfs cluster-slave1:/opt/hadoop
hadoop-daemon.sh start namenode
hdfs namenode -bootstrapStandby
hadoop-daemon.sh start namenode
hdfs zkfc -formatZK
stop-dfs.sh
start-dfs.sh
start-yarn.sh
标签:head jdk clust eve 执行 cmd dock 集群 res
原文地址:https://www.cnblogs.com/njpkhuan/p/11611956.html