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

swiftfs ls fails with NPE for dirs with single file

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.3.0
    • None
    • fs/swift
    • 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

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

            Dates

              Created:
              Updated: