Hadoop Common
  1. Hadoop Common
  2. HADOOP-8910

Add examples to GlobExpander#expand method

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.0
    • Component/s: fs
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Every time I review code related to glob I end up having to relearn how the code works. Adding few examples should help understand some of this code better.

      1. HADOOP-8910.patch
        4 kB
        Suresh Srinivas

        Activity

        Hide
        Daryn Sharp added a comment -

        Nice addition, but are you sure the examples work? Historically I've seen exceptions if a curly-braced list contains a /. Also, some of the expansion look wrong, at least with respect to the shell. Ex. "{a/b,c/d,{e,f}} - a/b, c/d,

        {e,f}

        " should expand as "a/b, c/d, e, f"

        Show
        Daryn Sharp added a comment - Nice addition, but are you sure the examples work? Historically I've seen exceptions if a curly-braced list contains a /. Also, some of the expansion look wrong, at least with respect to the shell. Ex. "{a/b,c/d,{e,f}} - a/b, c/d, {e,f} " should expand as "a/b, c/d, e, f"
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12548594/HADOOP-8910.patch
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 eclipse:eclipse. The patch built with eclipse:eclipse.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed unit tests in hadoop-common-project/hadoop-common.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/1598//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/1598//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12548594/HADOOP-8910.patch against trunk revision . +1 @author . The patch does not contain any @author tags. -1 tests included . The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . The javadoc tool did not generate any warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. +1 core tests . The patch passed unit tests in hadoop-common-project/hadoop-common. +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/1598//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/1598//console This message is automatically generated.
        Hide
        Eli Collins added a comment -

        Great stuff Suresh.

        Show
        Eli Collins added a comment - Great stuff Suresh.
        Hide
        Suresh Srinivas added a comment -

        @Eli thanks.

        Nice addition, but are you sure the examples work? Historically I've seen exceptions if a curly-braced list contains a /. Also, some of the expansion look wrong, at least with respect to the shell. Ex. "{a/b,c/d,{e,f}} - a/b, c/d, {e,f}" should expand as "a/b, c/d, e, f"

        Daryn, I cannot be wrong

        I just took it out of TestGlobExpander#testExpansion(). The document could be even better with perhaps more examples. But this is a good start.

        Show
        Suresh Srinivas added a comment - @Eli thanks. Nice addition, but are you sure the examples work? Historically I've seen exceptions if a curly-braced list contains a /. Also, some of the expansion look wrong, at least with respect to the shell. Ex. "{a/b,c/d,{e,f}} - a/b, c/d, {e,f}" should expand as "a/b, c/d, e, f" Daryn, I cannot be wrong I just took it out of TestGlobExpander#testExpansion(). The document could be even better with perhaps more examples. But this is a good start.
        Hide
        Daryn Sharp added a comment -

        +1 I hope you can find a way to forgive me for doubting you

        Show
        Daryn Sharp added a comment - +1 I hope you can find a way to forgive me for doubting you
        Hide
        Suresh Srinivas added a comment -

        I committed the patch to trunk.

        Show
        Suresh Srinivas added a comment - I committed the patch to trunk.
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk-Commit #2919 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2919/)
        HADOOP-8910. Add examples to GlobExpander#expand method. Contributed by Suresh Srinivas. (Revision 1397691)

        Result = SUCCESS
        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1397691
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/GlobExpander.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #2919 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2919/ ) HADOOP-8910 . Add examples to GlobExpander#expand method. Contributed by Suresh Srinivas. (Revision 1397691) Result = SUCCESS suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1397691 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/GlobExpander.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk-Commit #2857 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2857/)
        HADOOP-8910. Add examples to GlobExpander#expand method. Contributed by Suresh Srinivas. (Revision 1397691)

        Result = SUCCESS
        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1397691
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/GlobExpander.java
        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #2857 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2857/ ) HADOOP-8910 . Add examples to GlobExpander#expand method. Contributed by Suresh Srinivas. (Revision 1397691) Result = SUCCESS suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1397691 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/GlobExpander.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk-Commit #2880 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2880/)
        HADOOP-8910. Add examples to GlobExpander#expand method. Contributed by Suresh Srinivas. (Revision 1397691)

        Result = FAILURE
        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1397691
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/GlobExpander.java
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #2880 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2880/ ) HADOOP-8910 . Add examples to GlobExpander#expand method. Contributed by Suresh Srinivas. (Revision 1397691) Result = FAILURE suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1397691 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/GlobExpander.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #1194 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1194/)
        HADOOP-8910. Add examples to GlobExpander#expand method. Contributed by Suresh Srinivas. (Revision 1397691)

        Result = SUCCESS
        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1397691
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/GlobExpander.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #1194 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1194/ ) HADOOP-8910 . Add examples to GlobExpander#expand method. Contributed by Suresh Srinivas. (Revision 1397691) Result = SUCCESS suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1397691 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/GlobExpander.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk #1225 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1225/)
        HADOOP-8910. Add examples to GlobExpander#expand method. Contributed by Suresh Srinivas. (Revision 1397691)

        Result = SUCCESS
        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1397691
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/GlobExpander.java
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #1225 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1225/ ) HADOOP-8910 . Add examples to GlobExpander#expand method. Contributed by Suresh Srinivas. (Revision 1397691) Result = SUCCESS suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1397691 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/GlobExpander.java

          People

          • Assignee:
            Suresh Srinivas
            Reporter:
            Suresh Srinivas
          • Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development