Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-9372

Remove dead code in DataStorage.recoverTransitionRead

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.8.0, 3.0.0-alpha1
    • datanode
    • None
    • Reviewed

    Description

      DataStorage.java
          if (this.initialized) {
            LOG.info("DataNode version: " + HdfsServerConstants.DATANODE_LAYOUT_VERSION
                + " and NameNode layout version: " + nsInfo.getLayoutVersion());
            this.storageDirs = new ArrayList<StorageDirectory>(dataDirs.size());
            // mark DN storage is initialized
            this.initialized = true;
          }
      

      The first if should be !this.initialized I think?

      Attachments

        1. HDFS-9372-v0.patch
          2 kB
          Duo Zhang
        2. HDFS-9372-v1.patch
          2 kB
          Duo Zhang

        Issue Links

          Activity

            People

              zhangduo Duo Zhang
              zhangduo Duo Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: