Return-Path: X-Original-To: apmail-accumulo-user-archive@www.apache.org Delivered-To: apmail-accumulo-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D46D810B38 for ; Tue, 24 Sep 2013 16:20:12 +0000 (UTC) Received: (qmail 21894 invoked by uid 500); 24 Sep 2013 16:20:12 -0000 Delivered-To: apmail-accumulo-user-archive@accumulo.apache.org Received: (qmail 21651 invoked by uid 500); 24 Sep 2013 16:20:12 -0000 Mailing-List: contact user-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@accumulo.apache.org Delivered-To: mailing list user@accumulo.apache.org Received: (qmail 21610 invoked by uid 99); 24 Sep 2013 16:20:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Sep 2013 16:20:01 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of tequalsme@gmail.com designates 209.85.128.175 as permitted sender) Received: from [209.85.128.175] (HELO mail-ve0-f175.google.com) (209.85.128.175) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Sep 2013 16:19:56 +0000 Received: by mail-ve0-f175.google.com with SMTP id jy13so3616700veb.6 for ; Tue, 24 Sep 2013 09:19:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Al70qWg6Q9F+WvjO4GbvWeyVpT+YSh60oXDMc05VKH0=; b=ivIpWx0SIMij3zTk3JQU16gY+tTbkIE/qjRzChZRmY6riZ8mRf1f3fCDR8l5NBtXUY oTYyWIykKbkS1NQeQu9tygwFFRI5KVrsKWfukmnGXtuFH2hDhqBNuPhEzz0rbtDDZ3Ui MrpOyGlGsMqWHGY8Cwgrd/piK2384gvh9XNrPfEpU6+psqG/JBPYF39fcnBEC3wCgVdA 57Lgy8qWX6xRhjNLagyJDQSowLZKETF/TnosQQon1hDixY3Gki1LpdXQXX5ru+ilhE+8 9bC8yicszYzMge/0DVpBpNyr/x4RZVUejA1yfGNbB+59gYTD6MhNfKaOmC+y7g5SOOx1 eNdA== MIME-Version: 1.0 X-Received: by 10.52.169.227 with SMTP id ah3mr654153vdc.45.1380039575276; Tue, 24 Sep 2013 09:19:35 -0700 (PDT) Received: by 10.58.44.170 with HTTP; Tue, 24 Sep 2013 09:19:35 -0700 (PDT) In-Reply-To: References: Date: Tue, 24 Sep 2013 12:19:35 -0400 Message-ID: Subject: Re: Has anyone used mrunit to test Mutations produced from Mappers or Reducers? From: Tim Reardon To: user@accumulo.apache.org Content-Type: multipart/alternative; boundary=089e0160bd36a913c804e723806f X-Virus-Checked: Checked by ClamAV on apache.org --089e0160bd36a913c804e723806f Content-Type: text/plain; charset=ISO-8859-1 The problem is that Mutation.equals() calls a private serialize() method that modifies the data about to be checked. I have successfully worked around this in the past by wrapping the Mutation in a new Mutation, which calls serialize under the hood: assertEquals(expectedMutation, new Mutation(actualMutation)); This applies to 1.4.x, I don't know if Mutation.equals() has changed since then. Tim On Tue, Sep 24, 2013 at 8:58 AM, David Medinets wrote: > > http://stackoverflow.com/questions/18541143/how-to-test-a-reducer-containing-a-mutation- there is a question on Stack Overflow about this. And I would not mind > knowing the answer also. > --089e0160bd36a913c804e723806f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

The problem is that Mutation.equals() calls a priv= ate serialize() method that modifies the data about to be checked. I have succ= essfully worked around this in the past by wrapping the Mutation in a new M= utation, which calls serialize under the hood:

 assertEquals(expectedMutation, new Mutation(actualMutation));
This applies to 1.4.x, = I don't know if Mutation.equals() has changed since then.

Tim

On Tue, Sep 24, 2013 at 8:58 AM, David Medinets <david.medinets@gmail.com> wrote:
http://stackoverflow.com/questions/1854= 1143/how-to-test-a-reducer-containing-a-mutation - there is a question = on Stack Overflow about this. And I would not mind knowing the answer also.=

--089e0160bd36a913c804e723806f--