Please follow the steps given below:
1) Stop all the daemons in all the nodes
2) Now Open the zoo.cfg file
3) Delete the zookeeper directory which you have mentioned in the zoo.cfg file. and re create the directory.
4) Now similarly delete and recreate the datanode directory which you have mentioned in the hdfs-site.xml file
5) At last format the namenode and start the daemons.
Here I am referring you one link to set up HA in case you are not following any document
I think this will resolve the query. Please let me know if you are facing any further issue regarding this.