Hadoop Common
  1. Hadoop Common
  2. HADOOP-6787

Factor out glob pattern code from FileContext and Filesystem

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.22.0
    • Component/s: fs
    • Labels:
      None
    • Hadoop Flags:
      Incompatible change, Reviewed
    • Tags:
      glob pattern

      Description

      Refactor the glob pattern code out of FileContext and FileSystem into a package private GlobFilter and the reusable GlobPattern class (InterfaceAudience.Private)

      Also fix the handling of ^ outside character class ([...]) reported in HADOOP-6618 and make the glob pattern code less restrictive (not throwing on some valid glob patterns.) and more POSIX standard compliant (support [!...]).

      1. hadoop-6787-y20s-v1.patch
        14 kB
        Luke Lu
      2. hadoop-6787-trunk-v1.patch
        19 kB
        Luke Lu
      3. hadoop-6787-trunk-v2.patch
        19 kB
        Luke Lu

        Issue Links

          Activity

          Luke Lu created issue -
          Luke Lu made changes -
          Field Original Value New Value
          Link This issue is related to HADOOP-6618 [ HADOOP-6618 ]
          Luke Lu made changes -
          Attachment hadoop-6787-y20s-v1.patch [ 12446045 ]
          Luke Lu made changes -
          Attachment hadoop-6787-trunk-v1.patch [ 12446049 ]
          Luke Lu made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Assignee Luke Lu [ vicaya ]
          Fix Version/s 0.22.0 [ 12314296 ]
          Luke Lu made changes -
          Link This issue blocks HADOOP-6728 [ HADOOP-6728 ]
          Tsz Wo Nicholas Sze made changes -
          Hadoop Flags [Incompatible change]
          Component/s fs [ 12310689 ]
          Luke Lu made changes -
          Attachment hadoop-6787-trunk-v2.patch [ 12446176 ]
          Luke Lu made changes -
          Issue Type Improvement [ 4 ] Bug [ 1 ]
          Description The GlobFilter class (especially the error-prone setRegex method) is duplicated in both FileContext and Filesystem. And I'd like to be able to reuse the most of the setRegex code for glob pattern matching in metrics filter configurations.

          We could at least factor out the hairy setRegex code and package them into a GlobPattern class with a minimum compile method.
          Refactor the glob pattern code out of FileContext and FileSystem into a package private GlobFilter and the reusable GlobPattern class (InterfaceAudience.Private)

          Also fix the handling of ^ outside character class ([...]) reported in HADOOP-6618 and make the glob pattern code less restrictive (not throwing on some valid glob patterns.) and more POSIX standard compliant (support [!...]).
          Eli Collins made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Eli Collins made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Eli Collins made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Hadoop Flags [Incompatible change] [Reviewed]
          Resolution Fixed [ 1 ]
          Eli Collins made changes -
          Hadoop Flags [Reviewed] [Incompatible change, Reviewed]
          Konstantin Shvachko made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Luke Lu
              Reporter:
              Luke Lu
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development