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

Fix INodeFile#getBlocks to not return null

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-alpha2
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: namenode
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Not all callers of INodeFile#getBlocks check for null. e.g.

        public final QuotaCounts storagespaceConsumedContiguous(
            BlockStoragePolicy bsp) {
      ...
            // Collect all distinct blocks
            Set<BlockInfo> allBlocks = new HashSet<>(Arrays.asList(getBlocks()));
      

      We can either fix each caller or alternatively fix getBlocks to never return null.

        Attachments

          Activity

            People

            • Assignee:
              arpitagarwal Arpit Agarwal
              Reporter:
              arpitagarwal Arpit Agarwal
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: