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/09/15 21:54:13 UTC

git commit: ACCUMULO-3117 Some extra logging I added when trying to figure out what was happening WRT replication.

Repository: accumulo
Updated Branches:
  refs/heads/master 7b9cf8498 -> bc2862da3


ACCUMULO-3117 Some extra logging I added when trying to figure out what was happening WRT replication.


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

Branch: refs/heads/master
Commit: bc2862da37a89fa82c307bd956b7a88c2e3f92e9
Parents: 7b9cf84
Author: Josh Elser <el...@apache.org>
Authored: Mon Sep 15 15:45:03 2014 -0400
Committer: Josh Elser <el...@apache.org>
Committed: Mon Sep 15 15:45:45 2014 -0400

----------------------------------------------------------------------
 .../master/replication/DistributedWorkQueueWorkAssigner.java    | 4 +++-
 .../accumulo/tserver/replication/AccumuloReplicaSystem.java     | 5 ++++-
 .../tserver/replication/BatchWriterReplicationReplayer.java     | 4 +++-
 .../tserver/replication/ReplicationServicerHandler.java         | 4 +++-
 test/src/test/resources/log4j.properties                        | 1 +
 5 files changed, 14 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/bc2862da/server/master/src/main/java/org/apache/accumulo/master/replication/DistributedWorkQueueWorkAssigner.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/replication/DistributedWorkQueueWorkAssigner.java b/server/master/src/main/java/org/apache/accumulo/master/replication/DistributedWorkQueueWorkAssigner.java
index 1eb6cc4..3810372 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/replication/DistributedWorkQueueWorkAssigner.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/replication/DistributedWorkQueueWorkAssigner.java
@@ -184,9 +184,10 @@ public abstract class DistributedWorkQueueWorkAssigner implements WorkAssigner {
       WorkSection.limit(workScanner);
       workScanner.setRange(Range.exact(file));
 
-      int newReplicationTasksSubmitted = 0;
+      int newReplicationTasksSubmitted = 0, workEntriesRead = 0;
       // For a file, we can concurrently replicate it to multiple targets
       for (Entry<Key,Value> workEntry : workScanner) {
+        workEntriesRead++;
         Status status;
         try {
           status = StatusUtil.fromValue(workEntry.getValue());
@@ -229,6 +230,7 @@ public abstract class DistributedWorkQueueWorkAssigner implements WorkAssigner {
         }
       }
 
+      log.debug("Read {} replication entries from the WorkSection of the replication table", workEntriesRead);
       log.info("Assigned {} replication work entries for {}", newReplicationTasksSubmitted, file);
     }
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/bc2862da/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 75bfa43..416a86e 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
@@ -73,7 +73,7 @@ import org.slf4j.LoggerFactory;
 import com.google.common.base.Preconditions;
 
 /**
- * 
+ *
  */
 public class AccumuloReplicaSystem implements ReplicaSystem {
   private static final Logger log = LoggerFactory.getLogger(AccumuloReplicaSystem.class);
@@ -324,6 +324,9 @@ public class AccumuloReplicaSystem implements ReplicaSystem {
         // Read and send a batch of mutations
         replResult = ReplicationClient.executeServicerWithReturn(peerInstance, peerTserver, new WalClientExecReturn(target, input, p, currentStatus, sizeLimit,
             remoteTableId, tcreds, tids));
+      } catch (Exception e) {
+        log.error("Caught exception replicating data to {} at {}", peerInstance.getInstanceName(), peerTserver, e);
+        throw e;
       } finally {
         span.stop();
       }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/bc2862da/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/BatchWriterReplicationReplayer.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/BatchWriterReplicationReplayer.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/BatchWriterReplicationReplayer.java
index 6dfb206..358857d 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/BatchWriterReplicationReplayer.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/BatchWriterReplicationReplayer.java
@@ -138,7 +138,9 @@ public class BatchWriterReplicationReplayer implements AccumuloReplicationReplay
           throw new RemoteReplicationException(RemoteReplicationErrorCode.COULD_NOT_APPLY, "Could not apply mutations to " + tableName);
         }
 
-        mutationsApplied += value.mutations.size();
+        log.debug("{} mutations added to the BatchScanner", mutationsCopy.size());
+
+        mutationsApplied += mutationsCopy.size();
       }
     } finally {
       if (null != bw) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/bc2862da/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/ReplicationServicerHandler.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/ReplicationServicerHandler.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/ReplicationServicerHandler.java
index c0e064a..3ae0bd7 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/ReplicationServicerHandler.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/replication/ReplicationServicerHandler.java
@@ -42,7 +42,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * 
+ *
  */
 public class ReplicationServicerHandler implements Iface {
   private static final Logger log = LoggerFactory.getLogger(ReplicationServicerHandler.class);
@@ -113,6 +113,8 @@ public class ReplicationServicerHandler implements Iface {
 
     long entriesReplicated = replayer.replicateLog(conn, new ServerConfigurationFactory(HdfsZooInstance.getInstance()).getConfiguration(), tableName, data);
 
+    log.debug("Replicated {} mutations to {}", entriesReplicated, tableName);
+
     return entriesReplicated;
   }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/bc2862da/test/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/test/src/test/resources/log4j.properties b/test/src/test/resources/log4j.properties
index d8beb4b..10e2320 100644
--- a/test/src/test/resources/log4j.properties
+++ b/test/src/test/resources/log4j.properties
@@ -41,3 +41,4 @@ log4j.logger.org.apache.jasper=INFO
 log4j.logger.org.apache.hadoop.hdfs.server.namenode.FSNamesystem.audit=WARN
 log4j.logger.org.apache.hadoop.hdfs.server.datanode.DataNode.clienttrace=WARN
 log4j.logger.BlockStateChange=WARN
+log4j.logger.org.apache.accumulo.core.client.impl.TabletServerBatchReaderIterator=INFO