Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-3183

rm or rmf commands should respect globbing/regex of path

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 0.10.0
    • Fix Version/s: 0.12.0
    • Component/s: grunt
    • Labels:
      None
    • Patch Info:
      Patch Available
    • Release Note:
      Users should be encouraged to use "fs -rm *" if required. In general, using "fs" should yield the same behavior as hadoop.

      Description

      Hadoop fs commands support globbing during deleting files/dirs. Pig is not consistent with this behavior and seems like we could change rm/rmf commands to do the same.

      For eg:

      localhost:pig pkommireddi$ ls -ld out*
      drwxr-xr-x  12 pkommireddi  SF\domain users  408 Feb 13 01:09 out
      drwxr-xr-x   2 pkommireddi  SF\domain users   68 Feb 13 01:16 out1
      drwxr-xr-x   2 pkommireddi  SF\domain users   68 Feb 13 01:16 out2
      
      localhost:pig pkommireddi$ bin/pig -x local
      grunt> rmf out*
      grunt> quit
      
      localhost:pig pkommireddi$ ls -ld out*
      drwxr-xr-x  12 pkommireddi  SF\domain users  408 Feb 13 01:09 out
      drwxr-xr-x   2 pkommireddi  SF\domain users   68 Feb 13 01:16 out1
      drwxr-xr-x   2 pkommireddi  SF\domain users   68 Feb 13 01:16 out2
      

      Ideally, the user would expect "rmf out*" to delete all of the above dirs.

        Attachments

        1. PIG-3183.patch
          2 kB
          Prashant Kommireddi

          Activity

            People

            • Assignee:
              prkommireddi Prashant Kommireddi
              Reporter:
              prkommireddi Prashant Kommireddi
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: