Return-Path: X-Original-To: apmail-pig-dev-archive@www.apache.org Delivered-To: apmail-pig-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AD8FC730C for ; Tue, 29 Nov 2011 20:08:04 +0000 (UTC) Received: (qmail 69724 invoked by uid 500); 29 Nov 2011 20:08:04 -0000 Delivered-To: apmail-pig-dev-archive@pig.apache.org Received: (qmail 69694 invoked by uid 500); 29 Nov 2011 20:08:04 -0000 Mailing-List: contact dev-help@pig.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pig.apache.org Delivered-To: mailing list dev@pig.apache.org Received: (qmail 69686 invoked by uid 500); 29 Nov 2011 20:08:04 -0000 Delivered-To: apmail-hadoop-pig-dev@hadoop.apache.org Received: (qmail 69683 invoked by uid 99); 29 Nov 2011 20:08:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Nov 2011 20:08:04 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Nov 2011 20:08:01 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id AE2D5A7279 for ; Tue, 29 Nov 2011 20:07:40 +0000 (UTC) Date: Tue, 29 Nov 2011 20:07:40 +0000 (UTC) From: "xuting zhao (Updated) (JIRA)" To: pig-dev@hadoop.apache.org Message-ID: <856283491.23087.1322597260714.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <318275894.20653.1321004571549.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (PIG-2358) JobStats.getHadoopCounters() is never set and always returns null MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/PIG-2358?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] xuting zhao updated PIG-2358: ----------------------------- Attachment: (was: PIG-2358.patch) > 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.10 > Reporter: Vivek Padmanabhan > Assignee: xuting zhao > Fix For: 0.10 > > Attachments: PIG-2358-1.patch, PIG-2358.patch, TEST-org.apache.pig.test.TestPigRunner.txt > > > 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