How to format your HA enabled Hadoop Cluster?
Remember, This activity will result in Deletion of everything in HDFS. This can help you start or initialize Hadoop cluster from scratch.
1) Stop all Hadoop services from Ambari.
2) Stop any monitoring service on your cluster or outside of the cluster.
3) Start the Journal Node services on all three machines.
4) Login to Name node machine and execute following commands,
#su - hdfs c “hadoop namenode format”
type Y as an answer.
5)Login to Data nodes, remove contents of the directory specified by dfs.data.dir property.
6) Start Zookeeper service
7) Start the ZKFC for the Active NN and Standby NN.
8) Start Active Name node service.
9) Login to the Standby NN and execute following commands
#sudo -u hdfs hdfs namenode bootstrapStandby
10) Start all other services.