Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
HDFS, mail # user - Starting NameNode with finalize option


Copy link to this message
-
Starting NameNode with finalize option
Brahma Reddy Battula 2012-07-24, 13:01
Hi ALL,

Can  Anyone tell me when following finalize option will be used.

 case FINALIZE: {
        boolean aborted = finalize(conf, true);
        System.exit(aborted ? 1 : 0);
        return null; // avoid javac warning
 private static boolean finalize(Configuration conf,
                               boolean isConfirmationNeeded
                               ) throws IOException {
    String nsId = DFSUtil.getNamenodeNameServiceId(conf);
    String namenodeId = HAUtil.getNameNodeId(conf, nsId);
    initializeGenericKeys(conf, nsId, namenodeId);

    FSNamesystem nsys = new FSNamesystem(conf, new FSImage(conf));
    System.err.print(
        "\"finalize\" will remove the previous state of the files system.\n"
        + "Recent upgrade will become permanent.\n"
        + "Rollback option will not be available anymore.\n");
    if (isConfirmationNeeded) {
      if (!confirmPrompt("Finalize filesystem state?")) {
        System.err.println("Finalize aborted.");
        return true;
      }
    }
    nsys.dir.fsImage.finalizeUpgrade();
    return false;
  }
I thought after up-gradation it'll be used to finalize filesystem instead of finalize upgrade. But it was failing by logging following in .out log and it process got hang since it's expecting input which we can't give.
Finalize filesystem state? (Y or N) Invalid input:
Finalize filesystem state? (Y or N) Invalid input:
Finalize filesystem state? (Y or N) Invalid input:
Finalize filesystem state? (Y or N) Invalid input:
Finalize filesystem state? (Y or N) Invalid input:
Finalize filesystem state? (Y or N) Invalid input:
Finalize filesystem state? (Y or N) Invalid input:
Finalize filesystem state? (Y or N) Invalid input:
Finalize filesystem state? (Y or N) Invalid input:
+
Brahma Reddy Battula 2012-07-24, 15:02