[ 
https://issues.apache.org/jira/browse/PIG-889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12736201#action_12736201
 ] 

Santhosh Srinivasan commented on PIG-889:
-----------------------------------------

The PigHadoopLogger implements the PigLogger interface. The only supported 
method for this interface is warn(). Supporting counters as part of Pig will 
involve part of what you suggest. While your implementation extends 
PigHadoopLogger, it is not generic to support counters in Pig. Other load 
functions will have to use direct references to PigHadoopLogger which is not 
the correct way of accessing and updating counters. Pig needs to extend the 
load function interface (and store function interface?) to allow access to 
counters.

Summary: Pig needs to support counters and its a slightly bigger topic. 
Extending functionality of existing classes that are meant for a different 
reason will make support difficult in the future.

If you agree, we can mark this issue as invalid and open a new jira that will 
capture requirements for supporting counters in Pig?

> Pig can not access reporter of PigHadoopLog in Load Func
> --------------------------------------------------------
>
>                 Key: PIG-889
>                 URL: https://issues.apache.org/jira/browse/PIG-889
>             Project: Pig
>          Issue Type: Improvement
>          Components: impl
>    Affects Versions: 0.4.0
>            Reporter: Jeff Zhang
>            Assignee: Jeff Zhang
>             Fix For: 0.4.0
>
>         Attachments: Pig_889_Patch.txt
>
>
> I'd like to increment Counter in my own LoadFunc, but it will throw 
> NullPointerException. It seems that the reporter is not initialized.  
> I looked into this problem and find that it need to call 
> PigHadoopLogger.getInstance().setReporter(reporter) in PigInputFormat.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to