Merge branch '1.6'

Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/9abe28d6
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/9abe28d6
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/9abe28d6

Branch: refs/heads/master
Commit: 9abe28d6af03673447b701ee54a540b440c63165
Parents: 3a99300 2364c26
Author: Bill Slacum <ujustgotbi...@apache.org>
Authored: Sun Apr 12 15:45:42 2015 -0400
Committer: Bill Slacum <ujustgotbi...@apache.org>
Committed: Sun Apr 12 15:45:42 2015 -0400

----------------------------------------------------------------------
 .../org/apache/accumulo/core/data/Mutation.java | 28 +++++++++++---------
 1 file changed, 15 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/9abe28d6/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 f532a52,5b052c3..1cc4242
--- a/core/src/main/java/org/apache/accumulo/core/data/Mutation.java
+++ b/core/src/main/java/org/apache/accumulo/core/data/Mutation.java
@@@ -1115,13 -614,9 +1116,13 @@@ public class Mutation implements Writab
    }
  
    private boolean equalMutation(Mutation m) {
-     byte[] myData = serializedSnapshot();
-     byte[] otherData = m.serializedSnapshot();
-     if (Arrays.equals(row, m.row) && entries == m.entries && 
Arrays.equals(myData, otherData)) {
+     ByteBuffer myData = serializedSnapshot();
+     ByteBuffer otherData = m.serializedSnapshot();
+     if (Arrays.equals(row, m.row) && entries == m.entries && 
myData.equals(otherData)) {
 +      // If two mutations don't have the same
 +      if (!replicationSources.equals(m.replicationSources)) {
 +        return false;
 +      }
        if (values == null && m.values == null)
          return true;
  
@@@ -1149,25 -648,13 +1154,22 @@@
    }
  
    private TMutation toThrift(boolean serialize) {
-     byte[] data;
      if (serialize) {
        this.serialize();
-       data = this.data;
-     } else {
-       data = serializedSnapshot();
      }
-     TMutation tmutation = new TMutation(java.nio.ByteBuffer.wrap(row), 
java.nio.ByteBuffer.wrap(data), ByteBufferUtil.toByteBuffers(values), entries);
+     ByteBuffer data = serializedSnapshot();
 -    return new TMutation(ByteBuffer.wrap(row), data, 
ByteBufferUtil.toByteBuffers(values), entries);
++    TMutation tmutation = new TMutation(ByteBuffer.wrap(row), data, 
ByteBufferUtil.toByteBuffers(values), entries);
 +    if (!this.replicationSources.isEmpty()) {
 +      tmutation.setSources(new ArrayList<>(replicationSources));
 +    }
 +    return tmutation;
    }
  
 +  /**
 +   * Gets the serialization format used to (de)serialize this mutation.
 +   *
 +   * @return serialization format
 +   */
    protected SERIALIZED_FORMAT getSerializedFormat() {
      return this.useOldDeserialize ? SERIALIZED_FORMAT.VERSION1 : 
SERIALIZED_FORMAT.VERSION2;
    }

Reply via email to