hadoop-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nitin Goyal <nitin2go...@gmail.com>
Subject Editlog recoverUnclosedStreams not getting called when cluster restarted and its not an UPGRADE
Date Wed, 02 Jul 2014 09:34:30 GMT
Hi All,

I would like to know the reason behind not calling
in "initEditLog" method of FSImage.java.

public void initEditLog(StartupOption startOpt) throws IOException {

    Preconditions.checkState(getNamespaceID() != 0,

        "Must know namespace ID before initting edit log");

    String nameserviceId = DFSUtil.getNamenodeNameServiceId(conf);

    if (!HAUtil.isHAEnabled(conf, nameserviceId)) {

      // If this NN is not HA



    } else if (HAUtil.isHAEnabled(conf, nameserviceId)

        && (startOpt == StartupOption.UPGRADE

            || RollingUpgradeStartupOption.ROLLBACK.matches(startOpt))) {

      // This NN is HA, but we're doing an upgrade or a rollback of rolling

      // upgrade so init the edit log for write.


      if (startOpt == StartupOption.UPGRADE) {

        long sharedLogCTime = editLog.getSharedLogCTime();

        if (this.storage.getCTime() < sharedLogCTime) {

          throw new IOException("It looks like the shared log is already " +

              "being upgraded but this NN has not been upgraded yet. You " +

              "should restart this NameNode with the '" +

              StartupOption.BOOTSTRAPSTANDBY.getName() + "' option to bring
" +

              "this NN in sync with the other.");




    } else {

      // This NN is HA and we're not doing an upgrade.




Actually, I have a use case where I want to read the progress file when the
namenode comes up while Yarn HA is enabled. I am using hadoop 2.4.

Nitin Goyal

View raw message