0

we have amabri cluster ( version 2.6 ) with 24 workers machines

we want to run following commands only on worker23 machine ( because problem on worker23 ) , dose these commands effected on all FileSystem of all the workers? or only on worker23 ?

 $ hadoop namenode -format

 $ hdfs namenode -format
jango
  • 59
  • 2
  • 2
  • 12

1 Answers1

1

You will format your entire cluster.. So I wouldn't do that unless you want to clear out the cluster.

You can just clear your your hdfs directories on that host and restart the datanode. If you have a replication set for your data you are ok

Mike
  • 21,910
  • 7
  • 55
  • 79
  • great so how to clear hdfs directories only on host worker23 ? – jango Nov 20 '17 at 18:08
  • stop the datanode on that server and delete your hdfs directory(s) then start datanode – Mike Nov 20 '17 at 20:18
  • we get the errors - ERROR datanode.DataNode (BPServiceActor.java:run(772)) - Initialization failed for Block pool (Datanode Uuid f8a931c8-b4fe-4451-9823-2308c2d693ed) , after we removed the hdfs and start the datanode – jango Nov 20 '17 at 20:34
  • you need to remove the data dir in the hdfs dir(s) – Mike Nov 20 '17 at 20:43
  • what you mean data is under hdfs and we removed the hdfs folder – jango Nov 20 '17 at 20:49
  • yes.. just re-create the folder structure from looking at another node and start the datanode – Mike Nov 20 '17 at 21:12
  • do you mean to do - rm -rf hadoop , and then mkdir -p hadoop/hdfs/data and then start the dadanode ? – jango Nov 20 '17 at 21:17
  • I do it on all partitions - rm -rf hadoop , and then mkdir -p hadoop/hdfs/data and then start the dadanode , but still with te same problem – jango Nov 20 '17 at 21:45
  • I get the error - 2017-11-20 21:43:30,911 ERROR datanode.DataNode (BPServiceActor.java:run(772)) - Initialization failed for Block pool (Datanode Uuid ad0af75b-e973-475b-b525-52974df91fd1) service to master03 – jango Nov 20 '17 at 21:47
  • Being a complete hadoop newbie I assume this will not format my hard drive at all, but just create a hadoop file? – Superdooperhero Dec 05 '19 at 18:42
  • @Superdooperhero it just formats the journal data for HDFS – Mike Dec 09 '19 at 03:22