Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

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


+
Brahma Reddy Battula 2012-07-24, 13:01
Copy link to this message
-
RE: Starting NameNode with finalize option
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 [[EMAIL PROTECTED]]
Sent: Tuesday, July 24, 2012 9:01 PM
To: [EMAIL PROTECTED]
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:
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB