Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • Snapshot (HDFS-2802)
    • Snapshot (HDFS-2802)
    • namenode
    • None

    Description

      The method attempts to iterate over the child list of the directory, but that list may be null and this isn't handled currently.

      Attachments

        1. HDFS-4158.patch
          0.8 kB
          Aaron Myers

        Issue Links

          Activity

            atm Aaron Myers added a comment -

            Here's a trivial patch which fixes the issue. No tests are included since this functionality (deleting an empty directory) is currently covered by several other tests.

            atm Aaron Myers added a comment - Here's a trivial patch which fixes the issue. No tests are included since this functionality (deleting an empty directory) is currently covered by several other tests.
            atm Aaron Myers added a comment -

            Forgot to mention - the snapshots branch doesn't currently compile without HDFS-4150, so I tested this patch by applying the latest patch there first.

            atm Aaron Myers added a comment - Forgot to mention - the snapshots branch doesn't currently compile without HDFS-4150 , so I tested this patch by applying the latest patch there first.
            jingzhao Jing Zhao added a comment -

            Thanks for the fix Aaron! Actually I notice this problem too and I included a similar fix in HDFS-4147#HDFS-snapshot-check-rename.patch.

            jingzhao Jing Zhao added a comment - Thanks for the fix Aaron! Actually I notice this problem too and I included a similar fix in HDFS-4147 #HDFS-snapshot-check-rename.patch.
            atm Aaron Myers added a comment -

            Ah, so you did. It might be better to use INodeDirectory#getChildrenList instead of INodeDirectory#getChildren and then do a null check. Very minor issue though.

            atm Aaron Myers added a comment - Ah, so you did. It might be better to use INodeDirectory#getChildrenList instead of INodeDirectory#getChildren and then do a null check. Very minor issue though.

            People

              atm Aaron Myers
              atm Aaron Myers
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: