You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Alan Gates (JIRA)" <ji...@apache.org> on 2009/01/20 20:34:59 UTC

[jira] Commented: (PIG-626) Statistics (records read by each mapper and reducer)

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

Alan Gates commented on PIG-626:
--------------------------------

Shubham, I have several comments and questions about this patch:

# What exactly is the goal here, to make statistics available to users via the PigServer interface, or to add certain specific statistics to map and reduce?  
# If I understand correctly you are just returning pig specific counters in PigServer.getStats().  Why not return all counters (if they are available)?  Perhaps users would want to read the hadoop counters too.
# There are some println's stuck in here that print out the stats at the end of the job.  This should be written to the logs instead.
# I don't see where the statistics are actually being incremented during the map reduce job.  I see where they're collected after the job.


> Statistics (records read by each mapper and reducer)
> ----------------------------------------------------
>
>                 Key: PIG-626
>                 URL: https://issues.apache.org/jira/browse/PIG-626
>             Project: Pig
>          Issue Type: New Feature
>          Components: impl
>    Affects Versions: types_branch
>            Reporter: Shubham Chopra
>            Priority: Minor
>         Attachments: pigStats.patch
>
>
> This uses the counters framework that hadoop has. Initially, I am just interested in finding out the number of records read by each mapper/reducer particularly for the last job in any script. A sample code to access the statistics for the last job:
> String reducePlan = stats.getPigStats().get(stats.getLastJobID()).get("PIG_STATS_REDUCE_PLAN");
>         if(reducePlan == null) {
>             System.out.println("Records written : " + stats.getPigStats().get(stats.getLastJobID()).get("PIG_STATS_MAP_OUTPUT_RECORDS"));
>         } else {
>             System.out.println("Records written : " + stats.getPigStats().get(stats.getLastJobID()).get("PIG_STATS_REDUCE_OUTPUT_RECORDS"));
>         }
> The patch contains 7 test cases. These include tests PigStorage and BinStorage along with one for multiple MR jobs case.

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