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 <
[email protected]> wrote:

Send mail to
[email protected]

Thanks,
Sam

On 7/14/14, 2:12 PM, "Anki Reddy" <[email protected]> wrote:

Hi
unsubscribe me from the mailing list.
Regards,
Anki Reddy
On 14 Jul 2014 11:23, "Swapnil Shinde" <[email protected]> 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.



Reply via email to