Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Format ZKFC(hdfs zkfc –formatZK ) in Kerberos environment

avatar
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

avatar

@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?

View solution in original post

3 REPLIES 3

avatar

@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?

avatar
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

avatar
@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.