[ https://issues.apache.org/jira/browse/PIG-626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12705152#action_12705152 ]
Alan Gates commented on PIG-626: -------------------------------- Shubham, I apologize for being so slow to get to this. I see several issues in the patch. 1) The launcher code has changed significantly. I tried to figure out how to paste your code in, but I was afraid I was doing it wrong so I backed off. You'll need to integrate your patch with the changes. 2) All error messages now require an error code (see http://wiki.apache.org/pig/PigErrorHandlingFunctionalSpecification). 3) In a couple places when the code can't find the statistics information it says: {code} log.info("Jobs not found in the JobClient. Please try using a different Hadoop mode"); {code} It seems like this ought to be a warning instead of an info. Also, what does it mean to try a different hadoop mode? It's not clear from this message what action the user should take. I promise if you make another patch for this I'll look at it quickly so it doesn't go out of date on you again. > 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: 0.2.0 > Reporter: Shubham Chopra > Priority: Minor > Attachments: pigStats.patch, pigStats.patch, pigStats.patch, > pigStats.patch, TEST-org.apache.pig.test.TestBZip.txt > > > 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.