hdfs中配置多个namenode

来源:互联网 发布:学淘宝要学多久时间 编辑:程序博客网 时间:2024/05/21 08:56

将hdfs-site.xml如下设置即可(注意标红的地方):

<configuration><property><name>dfs.namenode.name.dir</name><value>/hdfs/name</value></property><property><name>dfs.datanode.data.dir</name><value>/hdfs/data</value></property><property><name>dfs.permissions</name><value>false</value></property><property><name>dfs.federation.nameservices</name><value>master,slave1</value></property><property><name>dfs.namenode.rpc-address.master</name><value>192.168.168.101:9000</value></property><property><name>dfs.namenode.http-address.master</name><value>192.168.168.101:23001</value></property><property><name>dfs.namenode.secondary.http-address.master</name><value>192.168.168.101:23002</value></property><property><name>dfs.namenode.rpc-address.slave1</name><value>192.168.168.102:9000</value></property><property><name>dfs.namenode.http-address.slave1</name><value>192.168.168.102:23001</value></property><property><name>dfs.namenode.secondary.http-address.slave1</name><value>192.168.168.102:23002</value></property></configuration>


0 0