You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Virag Kothari (Commented) (JIRA)" <ji...@apache.org> on 2011/11/11 19:44:51 UTC

[jira] [Commented] (PIG-2358) JobStats.getHadoopCounters() is never set and always returns null

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

Virag Kothari commented on PIG-2358:
------------------------------------

The API JobStats.getHadoopCounters() is very important as I can't get all hadoop counters through other API's (E.g. FILE_BYTES_READ, FILE_BYTES_WRITTEN, COMBINE_INPUT_RECORDS and many more)

                
> JobStats.getHadoopCounters() is never set and always returns null
> -----------------------------------------------------------------
>
>                 Key: PIG-2358
>                 URL: https://issues.apache.org/jira/browse/PIG-2358
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.1
>            Reporter: Vivek Padmanabhan
>
> The api  JobStats.getHadoopCounters() always returns null since the instance variable returned from the method ("counters") is never set.
> {code}
> PigStats stats = PigRunner.run(args, null);
> PigStats.JobGraph jobGraph = stats.getJobGraph();
> 		
> for (JobStats jobStats :  jobGraph) {
>    Counters counters = jobStats.getHadoopCounters();
>    System.out.println(counters);// prints null
> }
> {code}
> But of course I can get individual counter information through the other APIs (getHdfsBytesWritten(),getMapInputRecords() etc).
> I guess the change came in as part of PIG-1389 (the instance variable got replaced with method local variable in JobStats.addCounters).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira