You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by uj...@apache.org on 2015/04/10 03:15:44 UTC

[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 <uj...@apache.org>
Authored: Thu Apr 9 19:50:18 2015 -0400
Committer: Bill Slacum <uj...@apache.org>
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;