Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I tell if a hadoop namenode has already been formatted?

Tags:

hadoop

hdfs

When configuring my hadoop namenode for the first time, I know I need to run

bin/hadoop namenode -format

but running this a second time, after loading data into HDFS, will wipe out everything and reformat. Is there an easy way to tell if a namenode has already been formatted?

like image 828
Sam Ritchie Avatar asked Mar 11 '11 20:03

Sam Ritchie


1 Answers

Well you can check this file store1/name/current/VERSION

If it exist then it is already formatted.

PS: You do format only once in life in production system. Its better to do in the installation process or manually in emergency restoration time.

like image 139
Thejaswi R Avatar answered Nov 03 '22 22:11

Thejaswi R