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

rm or rmf commands should respect globbing/regex of path

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 0.10.0
    • 0.12.0
    • grunt
    • None
    • Patch Available
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: