accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [27/50] [abbrv] git commit: ACCUMULO-2819 Fix up logging. Test seems to be passing now.
Date Wed, 21 May 2014 01:59:46 GMT
ACCUMULO-2819 Fix up logging. Test seems to be passing now.


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

Branch: refs/heads/ACCUMULO-378
Commit: 5124fa39f661881fa4b6dd0c8de53abf9009e88b
Parents: ec2d8dd
Author: Josh Elser <elserj@apache.org>
Authored: Sun May 18 12:22:27 2014 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Sun May 18 12:22:27 2014 -0400

----------------------------------------------------------------------
 .../tserver/replication/AccumuloReplicaSystem.java |  2 +-
 .../BatchWriterReplicationReplayer.java            |  6 +++---
 .../test/replication/ReplicationSequentialIT.java  | 17 +++++++----------
 test/src/test/resources/log4j.properties           |  2 +-
 4 files changed, 12 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/5124fa39/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 6ed2c2d..ac6e1a0 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
@@ -200,7 +200,7 @@ public class AccumuloReplicaSystem implements ReplicaSystem {
                   if (0 < edits.walEdits.getEditsSize()) {
                     long entriesReplicated = client.replicateLog(remoteTableId, edits.walEdits);
                     if (entriesReplicated != edits.numUpdates) {
-                      log.warn("Sent {} WAL entries for replication but only {} were reported
as replicated", edits.walEdits.getEditsSize(), entriesReplicated);
+                      log.warn("Sent {} WAL entries for replication but {} were reported
as replicated", edits.numUpdates, entriesReplicated);
                     }
 
                     // We don't have to replicate every LogEvent in the file (only Mutation
LogEvents), but we

http://git-wip-us.apache.org/repos/asf/accumulo/blob/5124fa39/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 30e0846..0824169 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
@@ -71,9 +71,7 @@ public class BatchWriterReplicationReplayer implements AccumuloReplicationReplay
           }
         }
 
-        for (Mutation m : value.mutations) {
-          log.info("Mutation with for {} came from {}", new String(m.getRow()), m.getReplicationSources());
-        }
+        log.info("Applying {} updates to table {} as part of batch", value.mutations.size(),
tableName);
 
         try {
           bw.addMutations(value.mutations);
@@ -95,6 +93,8 @@ public class BatchWriterReplicationReplayer implements AccumuloReplicationReplay
       }
     }
 
+    log.info("Applied {} mutations in total to {}", mutationsApplied, tableName);
+
     return mutationsApplied;
   }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/5124fa39/test/src/test/java/org/apache/accumulo/test/replication/ReplicationSequentialIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/replication/ReplicationSequentialIT.java
b/test/src/test/java/org/apache/accumulo/test/replication/ReplicationSequentialIT.java
index 6c29108..0683a57 100644
--- a/test/src/test/java/org/apache/accumulo/test/replication/ReplicationSequentialIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/replication/ReplicationSequentialIT.java
@@ -152,9 +152,9 @@ public class ReplicationSequentialIT extends ConfigurableMacIT {
     log.debug("");
     for (Entry<Key,Value> kv : connMaster.createScanner(MetadataTable.NAME, Authorizations.EMPTY))
{
       if (ReplicationSection.COLF.equals(kv.getKey().getColumnFamily())) {
-        log.debug(kv.getKey().toStringNoTruncate() + " " + ProtobufUtil.toString(Status.parseFrom(kv.getValue().get())));
+        log.info(kv.getKey().toStringNoTruncate() + " " + ProtobufUtil.toString(Status.parseFrom(kv.getValue().get())));
       } else {
-        log.debug(kv.getKey().toStringNoTruncate() + " " + kv.getValue());
+        log.info(kv.getKey().toStringNoTruncate() + " " + kv.getValue());
       }
     }
 
@@ -171,32 +171,29 @@ public class ReplicationSequentialIT extends ConfigurableMacIT {
 
     connMaster.tableOperations().compact(masterTable, null, null, true, true);
 
-    log.debug("");
+    log.info("");
     log.info("Compaction completed");
 
     log.debug("");
     for (Entry<Key,Value> kv : connMaster.createScanner(MetadataTable.NAME, Authorizations.EMPTY))
{
       if (ReplicationSection.COLF.equals(kv.getKey().getColumnFamily())) {
-        log.debug(kv.getKey().toStringNoTruncate() + " " + ProtobufUtil.toString(Status.parseFrom(kv.getValue().get())));
+        log.info(kv.getKey().toStringNoTruncate() + " " + ProtobufUtil.toString(Status.parseFrom(kv.getValue().get())));
       } else {
-        log.debug(kv.getKey().toStringNoTruncate() + " " + kv.getValue());
+        log.info(kv.getKey().toStringNoTruncate() + " " + kv.getValue());
       }
     }
 
-    // We need to wait long enough for the records to make it from the metadata table to
the replication table
-//    Thread.sleep(5000);
     try {
       future.get(15, TimeUnit.SECONDS);
     } catch (TimeoutException e) {
       Assert.fail("Drain did not finish within 5 seconds");
     }
 
-    log.debug("");
+    log.info("");
     for (Entry<Key,Value> kv : connMaster.createScanner(ReplicationTable.NAME, Authorizations.EMPTY))
{
-      log.debug(kv.getKey().toStringNoTruncate() + " " + ProtobufUtil.toString(Status.parseFrom(kv.getValue().get())));
+      log.info(kv.getKey().toStringNoTruncate() + " " + ProtobufUtil.toString(Status.parseFrom(kv.getValue().get())));
     }
 
-
     Scanner master = connMaster.createScanner(masterTable, Authorizations.EMPTY), peer =
connPeer.createScanner(peerTable, Authorizations.EMPTY);
     Iterator<Entry<Key,Value>> masterIter = master.iterator(), peerIter = peer.iterator();
     Entry<Key,Value> masterEntry = null, peerEntry = null;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/5124fa39/test/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/test/src/test/resources/log4j.properties b/test/src/test/resources/log4j.properties
index 7649abc..171d690 100644
--- a/test/src/test/resources/log4j.properties
+++ b/test/src/test/resources/log4j.properties
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-log4j.rootLogger=INFO, CA
+log4j.rootLogger=DEBUG, CA
 log4j.appender.CA=org.apache.log4j.ConsoleAppender
 log4j.appender.CA.layout=org.apache.log4j.PatternLayout
 log4j.appender.CA.layout.ConversionPattern=%d{ISO8601} [%c{2}] %-5p: %m%n


Mime
View raw message