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

StorageDirectory should initialize a non-null default StorageDirType

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9.0, 3.0.0-alpha4
    • Component/s: hdfs
    • Labels:
      None
    • Hadoop Flags:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: