Return-Path: X-Original-To: apmail-accumulo-commits-archive@www.apache.org Delivered-To: apmail-accumulo-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3AF7110428 for ; Fri, 10 Apr 2015 01:15:42 +0000 (UTC) Received: (qmail 32267 invoked by uid 500); 10 Apr 2015 01:15:42 -0000 Delivered-To: apmail-accumulo-commits-archive@accumulo.apache.org Received: (qmail 32164 invoked by uid 500); 10 Apr 2015 01:15:42 -0000 Mailing-List: contact commits-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list commits@accumulo.apache.org Received: (qmail 32062 invoked by uid 99); 10 Apr 2015 01:15:42 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Apr 2015 01:15:42 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id DE1B3E01E0; Fri, 10 Apr 2015 01:15:41 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ujustgotbilld@apache.org To: commits@accumulo.apache.org Date: Fri, 10 Apr 2015 01:15:44 -0000 Message-Id: <26b31a01320248c683a042538c030fb0@git.apache.org> In-Reply-To: <0647f924e42c4eb99d7aff2a54a8526d@git.apache.org> References: <0647f924e42c4eb99d7aff2a54a8526d@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [4/6] accumulo git commit: Merge branch '1.5' into 1.6 Merge branch '1.5' into 1.6 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/6fa2090b Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/6fa2090b Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/6fa2090b Branch: refs/heads/master Commit: 6fa2090b6fa2c3189ed6b20c6b1f2506451cc97c Parents: 6605ad4 73ce9cf Author: Bill Slacum Authored: Thu Apr 9 19:50:18 2015 -0400 Committer: Bill Slacum Committed: Thu Apr 9 19:50:18 2015 -0400 ---------------------------------------------------------------------- .../org/apache/accumulo/core/data/Mutation.java | 34 +++++++++++++++++--- .../apache/accumulo/core/data/MutationTest.java | 28 ++++++++++++++++ 2 files changed, 57 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/6fa2090b/core/src/main/java/org/apache/accumulo/core/data/Mutation.java ---------------------------------------------------------------------- diff --cc core/src/main/java/org/apache/accumulo/core/data/Mutation.java index 34d8df1,81ad531..233a12e --- a/core/src/main/java/org/apache/accumulo/core/data/Mutation.java +++ b/core/src/main/java/org/apache/accumulo/core/data/Mutation.java @@@ -583,25 -705,13 +597,25 @@@ public class Mutation implements Writab @Override public int hashCode() { - return toThrift().hashCode(); + return toThrift(false).hashCode(); } + /** + * Checks if this mutation equals another. This method may be removed in a future API revision in favor of {@link #equals(Object)}. See ACCUMULO-1627 for more + * information. + * + * @param m + * mutation + * @return true if the given mutation equals this one, false otehrwise + */ public boolean equals(Mutation m) { + return this.equals((Object) m); + } + + private boolean equalMutation(Mutation m) { - serialize(); - m.serialize(); - if (Arrays.equals(row, m.row) && entries == m.entries && Arrays.equals(data, m.data)) { + byte[] myData = serializedSnapshot(); + byte[] otherData = m.serializedSnapshot(); + if (Arrays.equals(row, m.row) && entries == m.entries && Arrays.equals(myData, otherData)) { if (values == null && m.values == null) return true;