You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Swapnil Shinde <sw...@gmail.com> on 2014/07/14 07:52:15 UTC

Pig Progress Notification Listener

Hello
I am trying to use PPNL interface to get Pig job runtime details. For
testing, i am trying to do like this-

*Class implementing PPNL interface- **className - com.A.B*
*@Override*
*  public void jobStartedNotification(String scriptId, String
assignedJobId) {*
*    // TODO Auto-generated method stub*
*    log.info <http://log.info>("#### Custom Log - job started " + scriptId
+ " " + assignedJobId);    *
*  }*

*Inside Pig script-- script name - test_local.pig*

*SET pig.notification.listener com.A.B;*

*Pig command line run- PigListener.jar is created from PPNL implementing
class com.A.B*

*CLASSPATH=".:/home/xxx/yyy/PigListener.jar" pig.12 test_local.pig*

For testing, I am expecting Pig job run should print above log message.
However, I am not seeing it.
Please let me know what I am doing wrong in it..

Thanks.

Re: Pig Progress Notification Listener

Posted by Suraj Nayak M <sn...@gmail.com>.
Swapnil,

See an TestCase at 
http://svn.apache.org/repos/asf/pig/trunk/test/org/apache/pig/test/TestPigRunner.java 
where TestNotificationListener class (inner class) is defined.

--
Suraj Nayak

On Monday 14 July 2014 08:30 PM, Swapnil Shinde wrote:
> Hello
> I didn't specify log object creation in earlier snippet. I putting
> everything again for avoiding any confusion..
>
> *Class implementing PPNL interface- **className - com.A.B*
> private static final org.apache.commons.logging.Log log =
> LogFactory.getLog(PigContext.class);
> *@Override*
> *  public void jobStartedNotification(String scriptId, String
> assignedJobId) {*
> *    // TODO Auto-generated method stub*
> *    log.info <http://log.info/>("#### Custom Log - job started " +
> scriptId + " " + assignedJobId);    *
> *  }*
>
> *Inside Pig script-- script name - test_local.pig*
>
> *SET pig.notification.listener com.A.B;*
>
>   *Pig command line run- PigListener.jar is created from PPNL implementing
> class com.A.B*
> *CLASSPATH=".:/home/xxx/yyy/PigListener.jar" pig.12 test_local.pig*
>
> *Let me know if need any other details...*
>
>
> On Mon, Jul 14, 2014 at 4:45 AM, Kilaru, Sambaiah <
> Sambaiah_Kilaru@intuit.com> wrote:
>
>> Send mail to
>> user-unsubscribe@pig.apache.org
>>
>> Thanks,
>> Sam
>>
>> On 7/14/14, 2:12 PM, "Anki Reddy" <aa...@gmail.com> wrote:
>>
>>> Hi
>>> unsubscribe me from the mailing list.
>>> Regards,
>>> Anki Reddy
>>> On 14 Jul 2014 11:23, "Swapnil Shinde" <sw...@gmail.com> wrote:
>>>
>>>> Hello
>>>> I am trying to use PPNL interface to get Pig job runtime details. For
>>>> testing, i am trying to do like this-
>>>>
>>>> *Class implementing PPNL interface- **className - com.A.B*
>>>> *@Override*
>>>> *  public void jobStartedNotification(String scriptId, String
>>>> assignedJobId) {*
>>>> *    // TODO Auto-generated method stub*
>>>> *    log.info <http://log.info>("#### Custom Log - job started " +
>>>> scriptId
>>>> + " " + assignedJobId);    *
>>>> *  }*
>>>>
>>>> *Inside Pig script-- script name - test_local.pig*
>>>>
>>>> *SET pig.notification.listener com.A.B;*
>>>>
>>>> *Pig command line run- PigListener.jar is created from PPNL implementing
>>>> class com.A.B*
>>>>
>>>> *CLASSPATH=".:/home/xxx/yyy/PigListener.jar" pig.12 test_local.pig*
>>>>
>>>> For testing, I am expecting Pig job run should print above log message.
>>>> However, I am not seeing it.
>>>> Please let me know what I am doing wrong in it..
>>>>
>>>> Thanks.
>>>>
>>


Re: Pig Progress Notification Listener

Posted by Swapnil Shinde <sw...@gmail.com>.
Hello
I didn't specify log object creation in earlier snippet. I putting
everything again for avoiding any confusion..

*Class implementing PPNL interface- **className - com.A.B*
private static final org.apache.commons.logging.Log log =
LogFactory.getLog(PigContext.class);
*@Override*
*  public void jobStartedNotification(String scriptId, String
assignedJobId) {*
*    // TODO Auto-generated method stub*
*    log.info <http://log.info/>("#### Custom Log - job started " +
scriptId + " " + assignedJobId);    *
*  }*

*Inside Pig script-- script name - test_local.pig*

*SET pig.notification.listener com.A.B;*

 *Pig command line run- PigListener.jar is created from PPNL implementing
class com.A.B*
*CLASSPATH=".:/home/xxx/yyy/PigListener.jar" pig.12 test_local.pig*

*Let me know if need any other details...*


On Mon, Jul 14, 2014 at 4:45 AM, Kilaru, Sambaiah <
Sambaiah_Kilaru@intuit.com> wrote:

> Send mail to
> user-unsubscribe@pig.apache.org
>
> Thanks,
> Sam
>
> On 7/14/14, 2:12 PM, "Anki Reddy" <aa...@gmail.com> wrote:
>
> >Hi
> >unsubscribe me from the mailing list.
> >Regards,
> >Anki Reddy
> >On 14 Jul 2014 11:23, "Swapnil Shinde" <sw...@gmail.com> wrote:
> >
> >> Hello
> >> I am trying to use PPNL interface to get Pig job runtime details. For
> >> testing, i am trying to do like this-
> >>
> >> *Class implementing PPNL interface- **className - com.A.B*
> >> *@Override*
> >> *  public void jobStartedNotification(String scriptId, String
> >> assignedJobId) {*
> >> *    // TODO Auto-generated method stub*
> >> *    log.info <http://log.info>("#### Custom Log - job started " +
> >> scriptId
> >> + " " + assignedJobId);    *
> >> *  }*
> >>
> >> *Inside Pig script-- script name - test_local.pig*
> >>
> >> *SET pig.notification.listener com.A.B;*
> >>
> >> *Pig command line run- PigListener.jar is created from PPNL implementing
> >> class com.A.B*
> >>
> >> *CLASSPATH=".:/home/xxx/yyy/PigListener.jar" pig.12 test_local.pig*
> >>
> >> For testing, I am expecting Pig job run should print above log message.
> >> However, I am not seeing it.
> >> Please let me know what I am doing wrong in it..
> >>
> >> Thanks.
> >>
>
>

Re: Pig Progress Notification Listener

Posted by "Kilaru, Sambaiah" <Sa...@intuit.com>.
Send mail to
user-unsubscribe@pig.apache.org

Thanks,
Sam

On 7/14/14, 2:12 PM, "Anki Reddy" <aa...@gmail.com> wrote:

>Hi
>unsubscribe me from the mailing list.
>Regards,
>Anki Reddy
>On 14 Jul 2014 11:23, "Swapnil Shinde" <sw...@gmail.com> wrote:
>
>> Hello
>> I am trying to use PPNL interface to get Pig job runtime details. For
>> testing, i am trying to do like this-
>>
>> *Class implementing PPNL interface- **className - com.A.B*
>> *@Override*
>> *  public void jobStartedNotification(String scriptId, String
>> assignedJobId) {*
>> *    // TODO Auto-generated method stub*
>> *    log.info <http://log.info>("#### Custom Log - job started " +
>> scriptId
>> + " " + assignedJobId);    *
>> *  }*
>>
>> *Inside Pig script-- script name - test_local.pig*
>>
>> *SET pig.notification.listener com.A.B;*
>>
>> *Pig command line run- PigListener.jar is created from PPNL implementing
>> class com.A.B*
>>
>> *CLASSPATH=".:/home/xxx/yyy/PigListener.jar" pig.12 test_local.pig*
>>
>> For testing, I am expecting Pig job run should print above log message.
>> However, I am not seeing it.
>> Please let me know what I am doing wrong in it..
>>
>> Thanks.
>>


Re: Pig Progress Notification Listener

Posted by Anki Reddy <aa...@gmail.com>.
Hi
unsubscribe me from the mailing list.
Regards,
Anki Reddy
On 14 Jul 2014 11:23, "Swapnil Shinde" <sw...@gmail.com> wrote:

> Hello
> I am trying to use PPNL interface to get Pig job runtime details. For
> testing, i am trying to do like this-
>
> *Class implementing PPNL interface- **className - com.A.B*
> *@Override*
> *  public void jobStartedNotification(String scriptId, String
> assignedJobId) {*
> *    // TODO Auto-generated method stub*
> *    log.info <http://log.info>("#### Custom Log - job started " +
> scriptId
> + " " + assignedJobId);    *
> *  }*
>
> *Inside Pig script-- script name - test_local.pig*
>
> *SET pig.notification.listener com.A.B;*
>
> *Pig command line run- PigListener.jar is created from PPNL implementing
> class com.A.B*
>
> *CLASSPATH=".:/home/xxx/yyy/PigListener.jar" pig.12 test_local.pig*
>
> For testing, I am expecting Pig job run should print above log message.
> However, I am not seeing it.
> Please let me know what I am doing wrong in it..
>
> Thanks.
>