Return-Path: X-Original-To: apmail-hadoop-mapreduce-dev-archive@minotaur.apache.org Delivered-To: apmail-hadoop-mapreduce-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 260FCE484 for ; Sat, 9 Mar 2013 00:09:15 +0000 (UTC) Received: (qmail 69705 invoked by uid 500); 9 Mar 2013 00:09:13 -0000 Delivered-To: apmail-hadoop-mapreduce-dev-archive@hadoop.apache.org Received: (qmail 69629 invoked by uid 500); 9 Mar 2013 00:09:13 -0000 Mailing-List: contact mapreduce-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mapreduce-dev@hadoop.apache.org Delivered-To: mailing list mapreduce-dev@hadoop.apache.org Received: (qmail 69554 invoked by uid 99); 9 Mar 2013 00:09:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 09 Mar 2013 00:09:13 +0000 Date: Sat, 9 Mar 2013 00:09:13 +0000 (UTC) From: "Deepesh Khandelwal (JIRA)" To: mapreduce-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (MAPREDUCE-5055) Binary compatibility for the method Reporter.incrCounter(String group, String counter, long amount) between hadoop-1.x and hadoop-2.x MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MAPREDUCE-5055?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Deepesh Khandelwal resolved MAPREDUCE-5055. ------------------------------------------- Resolution: Not A Problem Thanks Zhijie. It turns out that examples jar is included in the classpath when hadoop jar command is run. I renamed my Class to something else and then I got the expected result i.e. the job failed with Counter limit exceeded error. > Binary compatibility for the method Reporter.incrCounter(String group, String counter, long amount) between hadoop-1.x and hadoop-2.x > ------------------------------------------------------------------------------------------------------------------------------------- > > Key: MAPREDUCE-5055 > URL: https://issues.apache.org/jira/browse/MAPREDUCE-5055 > Project: Hadoop Map/Reduce > Issue Type: Bug > Components: mrv2 > Affects Versions: 2.0.3-alpha > Environment: Linux > Reporter: Deepesh Khandelwal > Assignee: Zhijie Shen > Attachments: RandomWriter.java > > > Try to generate a lot of counters that exceed the default max limit so the job errors. > To simulate this edit org.apache.hadoop.examples.RandomWriter class and add the following in the mapper: > {code} > for (int i = 0; i < 150; i++) { > reporter.incrCounter("StringCounter", "counter" + i, 1L); > } > {code} > Attached is the modified code of RandomWriter.java from branch-1. > When I run it against branch-1, > {code} > hadoop jar build/hadoop-examples-1.2.0-SNAPSHOT.jar -Dtest.randomwrite.total_bytes=8 rw2 > {code} > it fails with the following error: > {code} > java.lang.Exception: org.apache.hadoop.mapred.Counters$CountersExceededException: Error: Exceeded limits on number of counters - Counters=120 Limit=120 > {code} > Using the jar compiled with branch-1 when running in a hadoop 2 cluster completes without any error and don't see the counter. Interestingly there were two more custom counters in the same job that are incremented and they are visible. The difference is that they use the method > Reporter.incrCounter(Enum key, long amount). > Compiled this against 2.x/trunk and ran it. The job did fail with the expected counter exceeded exception. So it seems to be a case of binary incompatibility between 1.x and 2.x. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira