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

NPE during disk usage calculation on snapshot directory, after a sub folder is deleted

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • None

    Description

      ContentSummary computation is causing NullPointerException on snapshot directory if some sub directory is deleted.
      Following are the steps to reproduce the issue.

      1. Create a root directory "/test"
      2. Create sub dir named as /test/sub1
      3. Create sub dir in sub1 as /test/sub1/sub2
      4. Create a file at /test/sub1/file1
      5. Create a file at /test/sub1/sub2/file1
      6. Enable shotshot on sub1 (hadoop dfsadmin -allowSnapshot test/sub1)
      7. Create snapshot1 on /test/sub1
      8. Delete directory /test/sub1/sub2 (recursively)
      9. Create snapshot2 on /test/sub1
      10. Execute du command on /test (hadoop fs -du /test/)

      Gives NullPointerException in CLI. NameNode logs the exception as
      ... java.lang.NullPointerException at org.apache.hadoop.hdfs.server.namenode.ContentSummaryComputationContext.getBlockStoragePolicySuite(ContentSummaryComputationContext.java:122) ...

      Attachments

        Issue Links

          Activity

            People

              kanaka Kanaka Kumar Avvaru
              kanaka Kanaka Kumar Avvaru
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: