You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by el...@apache.org on 2014/05/21 03:59:55 UTC

[36/50] [abbrv] git commit: ACCUMULO-2583 Was comparing number of mutations to number of updates in each mutation.

ACCUMULO-2583 Was comparing number of mutations to number of updates in each mutation.


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

Branch: refs/heads/ACCUMULO-378
Commit: d3cc1fee847b059de850102ccd3c65e66b7770bd
Parents: 9f77918
Author: Josh Elser <el...@apache.org>
Authored: Mon May 19 16:37:36 2014 -0400
Committer: Josh Elser <el...@apache.org>
Committed: Mon May 19 16:37:36 2014 -0400

----------------------------------------------------------------------
 .../accumulo/tserver/replication/AccumuloReplicaSystem.java  | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/d3cc1fee/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java
index ac6e1a0..64244c5 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java
@@ -343,7 +343,6 @@ public class AccumuloReplicaSystem implements ReplicaSystem {
    */
   protected long writeValueAvoidingReplicationCycles(DataOutputStream out, LogFileValue value, ReplicationTarget target) throws IOException {
     int mutationsToSend = 0;
-    long numUpdates = 0l;
     for (Mutation m : value.mutations) {
       if (!m.getReplicationSources().contains(target.getPeerName())) {
         mutationsToSend++;
@@ -356,7 +355,6 @@ public class AccumuloReplicaSystem implements ReplicaSystem {
     for (Mutation m : value.mutations) {
       // If we haven't yet replicated to this peer
       if (!m.getReplicationSources().contains(target.getPeerName())) {
-        numUpdates += m.size();
         // Add our name, and send it
         String name = conf.get(Property.REPLICATION_NAME);
         if (StringUtils.isBlank(name)) {
@@ -369,7 +367,7 @@ public class AccumuloReplicaSystem implements ReplicaSystem {
       }
     }
 
-    return numUpdates;
+    return mutationsToSend;
   }
 
   public static class ReplicationStats {
@@ -421,10 +419,10 @@ public class AccumuloReplicaSystem implements ReplicaSystem {
      */
     public long numUpdates;
 
-    public WalReplication(WalEdits edits, long size, long entriesConsumed, long numUpdates) {
+    public WalReplication(WalEdits edits, long size, long entriesConsumed, long numMutations) {
       super(size, edits.getEditsSize(), entriesConsumed);
       this.walEdits = edits;
-      this.numUpdates = numUpdates;
+      this.numUpdates = numMutations;
     }
   }
 }