01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
<
property
>
<
name
>dfs.nameservices
name
>
<
value
>mycluster
value
>
property
>
<
property
>
<
name
>dfs.ha.namenodes.mycluster
name
>
<
value
>nn1,nn2
value
>
property
>
<
property
>
<
name
>dfs.namenode.rpc-address.mycluster.nn1
name
>
<
value
> namenode1:8020
value
>
property
>
<
property
>
<
name
>dfs.namenode.rpc-address.mycluster.nn2
name
>
<
value
> namenode2:8020
value
>
property
>
<
property
>
<
name
>dfs.namenode.shared.edits.dir
name
>
<
value
>qjournal://namenode1:8485;namenode2:8485/mycluster
value
>
property
>
<
property
>
<
name
>dfs.client.failover.proxy.provider.mycluster
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
>/home/hadoop/.ssh/id_rsa
value
>
property
>
<
property
>
<
name
>dfs.ha.fencing.ssh.connect-timeout
name
>
<
value
>30000
value
>
property
>
<
property
>
<
name
>dfs.journalnode.edits.dir
name
>
<
value
>/path/to/hdfs/jn
value
>
property
>
|
fs.default | hdfs://mycluster |
服务器 | 配置项 | 值 |
namenode1 | dfs.namenode.http-address | namenode1:50070 |
namenode2 | dfs.namenode.http-address | namenode2:50070 |