Created 09-13-2020 09:17 AM
hi all
We are performing now the change hostname configuration on production cluster according to the document - https://docs.cloudera.com/HDPDocuments/Ambari-2.7.0.0/administering-ambari/content/amb_changing_host...
The last stage is talking about – "in case NameNode HA enabled , then need to run the following command on one of the name node"
hdfs zkfc -formatZK -force
since we have active name node and standby name node we assume that our namenode is HA enable ?
but we want to understand what are the risks when doing the following cli on one of the namenode
hdfs zkfc -formatZK -force
is the below command is safety to run without risks ?
Created 10-10-2020 11:35 AM
Always stick to the Cloudera documentation. Yes !!! there is no risk in running that command I can understand your reservation.
Created 09-29-2020 12:26 PM
Hello @mike_bronson7
No need to run "hdfs zkfc -formatZK -force" if you are not changing the hostname of the HDFS components like NameNode, FailoverController or ZooKeeper hosts in the cluster.
The command "hdfs zkfc -formatZK" is used to initialize the HA state in ZooKeeper. This will create a znode in ZooKeeper in which the automatic failover system stores its data.
The example below shows the HA znode output where it stores the name of the Active NN in the cluster.
[zk: localhost:2181(CONNECTED) 3] ls /hadoop-ha/ns1
[ActiveBreadCrumb, ActiveStandbyElectorLock] <=== HA znodes in zookeeper
[zk: localhost:2181(CONNECTED) 2] get /hadoop-ha/ns1/ActiveBreadCrumb
ns1
namenode39%nightly63x-2.nightly63x.root.hwx.site ?>(?> <==== Active NN hostname
[zk: localhost:2181(CONNECTED) 3]
The command "hdfs zkfc -formatZK -force" needs to run after the ZK Service is UP and running post hostname changes.
Created 10-09-2020 12:59 AM
you said that not need to run it , but the post that I mentioned say to run it , so what is right
Created 10-10-2020 11:35 AM
Always stick to the Cloudera documentation. Yes !!! there is no risk in running that command I can understand your reservation.