hadoop-hdfs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brahma Reddy Battula <brahmareddy.batt...@huawei.com>
Subject RE: Starting NameNode with finalize option
Date Tue, 24 Jul 2012 15:02:04 GMT
Hi

I got cause...


I ran like following

./hadoop daemon.sh start namenode -finalize so logs are redirected to out file and i was not
able give input(i.e Y or N). That's why NN got hang.

we should run like namenode -format

i.e ./hdfs namenode -finalize


Thanks And Regards

Brahma Reddy
________________________________
From: Brahma Reddy Battula [brahmareddy.battula@huawei.com]
Sent: Tuesday, July 24, 2012 9:01 PM
To: hdfs-user@hadoop.apache.org
Subject: Starting NameNode with finalize option

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:





Mime
View raw message