Pig
  1. Pig
  2. PIG-2525

Support pluggable PigProgressNotifcationListeners on the command line

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.11
    • Component/s: None
    • Labels:
      None

      Description

      It would be convenient to be able to implement PigProcessNotifcationListener and to wire it into a pig script. This jira is to support setting a listener and its constructor args on the command, perhaps like this:

      noformat
      pig -j MyListener -J "foo,bar,bat" -f my_script.pig
      noformat

      where MyListener takes a single string in the constructor which will get passed foo,bar,bat.

      1. PIG-2525.patch
        6 kB
        Dmitriy V. Ryaboy

        Activity

        Bill Graham created issue -
        Bill Graham made changes -
        Field Original Value New Value
        Summary Support plugable PigProcessNotifcationListeners on the command line Support pluggable PigProcessNotifcationListeners on the command line
        Bill Graham made changes -
        Description It would be convenient to be able to implement {{PigProcessNotifcationListener}} and to wire it into a pig script. This jira is to support setting a listener and its constructor args on the command, perhaps like this:

        {{noformat}}
        pig -l MyListener -L "foo,bar,bat" -f my_script.pig
        {{noformat}}

        where {{MyListener}} takes a single string in the constructor which will get passed {{foo,bar,bat}}.

        It would be convenient to be able to implement {{PigProcessNotifcationListener}} and to wire it into a pig script. This jira is to support setting a listener and its constructor args on the command, perhaps like this:

        {{noformat}}
        pig -j MyListener -J "foo,bar,bat" -f my_script.pig
        {{noformat}}

        where {{MyListener}} takes a single string in the constructor which will get passed {{foo,bar,bat}}.

        Hide
        Dmitriy V. Ryaboy added a comment -

        Why -j? I was thinking we could use properties for that:

        pig -Dpig.progress.listener=com.foo.PigListenerImpl -Dpig.progress.listener.args="foo,bar" -f my_script.pig

        Show
        Dmitriy V. Ryaboy added a comment - Why -j? I was thinking we could use properties for that: pig -Dpig.progress.listener=com.foo.PigListenerImpl -Dpig.progress.listener.args="foo,bar" -f my_script.pig
        Hide
        Dmitriy V. Ryaboy added a comment -

        Well this turned out pretty darn simple..

        Show
        Dmitriy V. Ryaboy added a comment - Well this turned out pretty darn simple..
        Dmitriy V. Ryaboy made changes -
        Attachment PIG-2525.patch [ 12514297 ]
        Dmitriy V. Ryaboy made changes -
        Attachment PIG-2525.patch [ 12514297 ]
        Hide
        Dmitriy V. Ryaboy added a comment -

        Re-attaching, forgot to rename "args" to "arg"...

        Show
        Dmitriy V. Ryaboy added a comment - Re-attaching, forgot to rename "args" to "arg"...
        Dmitriy V. Ryaboy made changes -
        Attachment PIG-2525.patch [ 12514302 ]
        Dmitriy V. Ryaboy made changes -
        Assignee Bill Graham [ billgraham ] Dmitriy V. Ryaboy [ dvryaboy ]
        Hide
        Daniel Dai added a comment -

        +1

        Show
        Daniel Dai added a comment - +1
        Hide
        Dmitriy V. Ryaboy added a comment -

        Committed to trunk.

        In case anyone wants it in earlier versions – patch applies cleanly to 0.9.2 and up.

        Show
        Dmitriy V. Ryaboy added a comment - Committed to trunk. In case anyone wants it in earlier versions – patch applies cleanly to 0.9.2 and up.
        Dmitriy V. Ryaboy made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 0.11 [ 12318878 ]
        Resolution Fixed [ 1 ]
        Bill Graham made changes -
        Summary Support pluggable PigProcessNotifcationListeners on the command line Support pluggable PigProgressNotifcationListeners on the command line
        Bill Graham made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        3d 2h 9m 1 Dmitriy V. Ryaboy 13/Feb/12 18:25
        Resolved Resolved Closed Closed
        374d 10h 28m 1 Bill Graham 22/Feb/13 04:54

          People

          • Assignee:
            Dmitriy V. Ryaboy
            Reporter:
            Bill Graham
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development