Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Format ZKFC(hdfs zkfc –formatZK ) in Kerberos environment

Solved Go to solution
Highlighted

Format ZKFC(hdfs zkfc –formatZK ) in Kerberos environment

Contributor

To reset ZKFC we have to stop both the ZKFC processes and run the following command as the hdfs super user : hdfs zkfc –formatZK

Is this same for Kerberos enabled environment?

Do we need to stop all HDFS Services and failover control?

Where do we need to run this command in NN or anywhere?

HDP Version - 2.4.3

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Format ZKFC(hdfs zkfc –formatZK ) in Kerberos environment

@Dhiraj

Yes, it will be the same for even Kerberos environment and you need to have valid hdfs keytab before running the command.

Execute the following command on NN1:

hdfs zkfc -formatZK 

This command creates a znode in ZooKeeper. The automatic failover system stores uses this znode for data storage.

Try this in lower environments before trying in prod.

Whats the reason to format znode?

3 REPLIES 3

Re: Format ZKFC(hdfs zkfc –formatZK ) in Kerberos environment

@Dhiraj

Yes, it will be the same for even Kerberos environment and you need to have valid hdfs keytab before running the command.

Execute the following command on NN1:

hdfs zkfc -formatZK 

This command creates a znode in ZooKeeper. The automatic failover system stores uses this znode for data storage.

Try this in lower environments before trying in prod.

Whats the reason to format znode?

Re: Format ZKFC(hdfs zkfc –formatZK ) in Kerberos environment

Contributor

Reason for format ZKFC is, Adding service rpc port property in NN: Please look for service rpc port in below link.

https://community.hortonworks.com/articles/43838/scaling-the-hdfs-namenode-part-1.html

Re: Format ZKFC(hdfs zkfc –formatZK ) in Kerberos environment

@Dhiraj

I hope your just changing the ports here. Already rpc calls should be enabled on the cluster. If thats the case "Changing the service RPC port settings requires a restart of the NameNodes, DataNodes and ZooKeeper Failover Controllers to take full effect. If you have NameNode HA setup, you can restart the NameNodes one at a time followed by a rolling restart of the remaining components to avoid cluster downtime."

Hope this helps you.