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

StorageDirectory should initialize a non-null default StorageDirType

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.9.0, 3.0.0-alpha4
    • hdfs
    • None
    • Reviewed

    Description

      Storage#shouldReturnNextDir method checks if the next Storage directory is of the same type us dirType.

          private boolean shouldReturnNextDir() {
            StorageDirectory sd = getStorageDir(nextIndex);
            return (dirType == null || sd.getStorageDirType().isOfType(dirType)) &&
                (includeShared || !sd.isShared());
          }
      

      There is a possibility that sd.getStorageDirType() returns null (default dirType is null). Hence, before checking for type match, we should make sure that the value returned by sd.getStorageDirType() is not null.

      Attachments

        1. HDFS-11362.001.patch
          2 kB
          Hanisha Koneru
        2. HDFS-11362.000.patch
          0.8 kB
          Hanisha Koneru

        Activity

          People

            hanishakoneru Hanisha Koneru
            hanishakoneru Hanisha Koneru
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: