Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-12080

swiftfs ls fails with NPE for dirs with single file

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.3.0
    • Fix Version/s: None
    • Component/s: fs/swift
    • Labels:
      None

      Description

      NPE from Globber.java (line 230) if a directory has only one child and there is no explicit parent directory object.

      To reproduce, create an object in swift directly (not using swiftfs), e.g. /foo/bar/baz in container test. Then, try to ls the "directory" for that object:

      hdfs dfs -ls swift://test.myswift/foo/bar/*

      This fails for dirs containing single files because in Globber.java there is a specific test for objects with a single child. The getFileStatus() call returns null for the object's parent (because no explicit directory object was created in swift). However, Globber assumes that if the child exists getPath() will return an object that exist.

        Attachments

          Activity

            People

            • Assignee:
              highlycaffeinated David Dobbins
              Reporter:
              highlycaffeinated David Dobbins
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: