Hadoop升级(HA+Federation) 2.2升级到2.6

参照《Hadoop升级(HA) 2.2升级到2.6

改变第3步骤:

一、

升级namenode的时候,指定clusterid,并在主namenode上执行即可

hdfs namenode -upgrade -clusterid CID-7a2161ec-ba1c-42d8-9f7b-d8a6c4c7df0ds

二、

热备namenode通过主namenode同步


附1:

在集群启动之后,如果提示Upgrade in progress. Not yet finalized. 在所有主namenode上执行 

hdfs dfsadmin -finalizeUpgrade

附2:

clusterid在namenode的配置目录下VERSION文件中有

[root@Mas2 hdfs]# cat dfs/name/current/VERSION 
#Tue May 10 10:15:51 CST 2016
namespaceID=1044597675
clusterID=CID-7a2161ec-ba1c-42d8-9f7b-d8a6c4c7df0d
cTime=1462846551641
storageType=NAME_NODE
blockpoolID=BP-1154360744-172.16.16.22-1457687866051
layoutVersion=-57

附3:

namenode类的可用选项

Usage: java NameNode [-backup] | 
        [-checkpoint] | 
        [-format [-clusterid cid ] [-force] [-nonInteractive] ] | 
        [-upgrade [-clusterid cid] [-renameReserved<k-v pairs>] ] | 
        [-rollback] | 
        [-rollingUpgrade <downgrade|rollback> ] | 
        [-finalize] | 
        [-importCheckpoint] | 
        [-initializeSharedEdits] | 
        [-bootstrapStandby] | 
        [-recover [ -force] ] | 
        [-metadataVersion ]  ]


你可能感兴趣的:(Hadoop升级(HA+Federation) 2.2升级到2.6)