Return-Path: X-Original-To: apmail-incubator-mrunit-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-mrunit-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 EA10D9CD2 for ; Wed, 2 Nov 2011 20:45:53 +0000 (UTC) Received: (qmail 49685 invoked by uid 500); 2 Nov 2011 20:45:53 -0000 Delivered-To: apmail-incubator-mrunit-dev-archive@incubator.apache.org Received: (qmail 49515 invoked by uid 500); 2 Nov 2011 20:45:53 -0000 Mailing-List: contact mrunit-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mrunit-dev@incubator.apache.org Delivered-To: mailing list mrunit-dev@incubator.apache.org Received: (qmail 49445 invoked by uid 99); 2 Nov 2011 20:45:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Nov 2011 20:45:53 +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; Wed, 02 Nov 2011 20:45:52 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 538F932E082 for ; Wed, 2 Nov 2011 20:45:32 +0000 (UTC) Date: Wed, 2 Nov 2011 20:45:32 +0000 (UTC) From: "Brock Noland (Commented) (JIRA)" To: mrunit-dev@incubator.apache.org Message-ID: <1333788793.52556.1320266732343.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1401637088.1237.1318873570541.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (MRUNIT-31) Support Hadoop 0.22 and 0.23 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/MRUNIT-31?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13142497#comment-13142497 ] Brock Noland commented on MRUNIT-31: ------------------------------------ If we used a mock library we would just mock Mapper.Context (and reducer) in both cases? {code} @SuppressWarnings({ "unchecked", "rawtypes" }) public static Mapper.Context create(final List> in, final Counters counters, Configuration conf) { Class mapContext = org.apache.hadoop.mapreduce.Mapper.Context.class; Mapper.Context context = (Mapper.Context) mock(mapContext); when(context.getCounter((Enum)any())).thenAnswer(new Answer() { @Override public Counter answer(InvocationOnMock invocation) { Object[] args = invocation.getArguments(); // should use guava preconditions return counters.findCounter((Enum)args[0]); } }); return context; } {code} > Support Hadoop 0.22 and 0.23 > ---------------------------- > > Key: MRUNIT-31 > URL: https://issues.apache.org/jira/browse/MRUNIT-31 > Project: MRUnit > Issue Type: Improvement > Reporter: Tom White > Attachments: MRUNIT-31.patch, MRUNIT-31.patch > > > The new MapReduce API changed in 0.21 (MAPREDUCE-954) in such a way as to break MRUnit. -- 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