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

globStatus doesn't grok groupings with a slash

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.23.0
    • 2.3.0
    • fs
    • None
    •  

    Description

      If a glob contains a grouping with a single item that contains a slash, ex. "

      {a/b}

      ", then globStatus throws "Illegal file pattern: Unclosed group near index 2" – regardless of whether the path exists. However, if the glob set contains more than one item, ex. "

      {a/b,c}

      ", then it throws a NullPointerException from FileSystem.java:1277.

      1276: FileStatus[] files = globStatusInternal(new Path(filePattern), filter);
      1277: for (FileStatus file : files) {
      1278:   results.add(file);
      1279: }
      

      The method globStatusInternal can return null, so the iterator fails with the NPE.

      Attachments

        Issue Links

          Activity

            People

              cmccabe Colin McCabe
              daryn Daryn Sharp
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: