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

Fix INodeFile#getBlocks to not return null

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0-alpha2
    • 2.8.0, 3.0.0-alpha1
    • namenode
    • None
    • 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

        1. HDFS-10764.01.patch
          4 kB
          Arpit Agarwal

        Activity

          People

            arp Arpit Agarwal
            arp Arpit Agarwal
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: