背景
虚拟机centos7系统3台,hadoop v3.2.1,分别设置了固定ip已经hostname:hadoop101,hadoop102,hadoop103,并设置ssh免密码登录。
开发环境windows10,idea2020
hdfs:
hadoop101:namenode、dataname
hadoop102:secondary-namenode、datanode、zookeeper
hadoop103:datanode
yarn:
hadoop101:resource-manager(rm1)、nodemanager
hadoop102:nodemanager
hadoop103:resource-manager(rm2)、nodemanager
最终配置文件
core-site.xml
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://hadoop101:9000</value>
</property>
<property>
<name>hadoop.tmp.dir</name>
<value>/tmp/my-hadoop/</value>
</property>
<!-- 配置 HDFS 网页登录使用的静态用户为 hadoop -->
<property>
<name>hadoop.http.staticuser.user</name>
<value>hadoop</value>
</property>
</configuration>
hdfs-site.xml
<configuration>
<property>
<name>dfs.replication</name>
<value>2</value>
</property>
<property>
<name>dfs.namenode.secondary.http-address</name>
<value>hadoop102:50090</value>
</property>
<!-- 关闭权限检查,否则win用户名不同write权限失败 -->
<property>
<name>dfs.permissions.enabled</name>
<value>false&