How can I tell if a hadoop namenode has already been formatted?
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开发者_JAVA技巧 a namenode has already been formatted?
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.
精彩评论