accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [29/50] [abbrv] git commit: ACCUMULO-378 Reorder how replication threads are started so that it happens after fate has begun
Date Wed, 21 May 2014 01:59:48 GMT
ACCUMULO-378 Reorder how replication threads are started so that it happens after fate has
begun


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

Branch: refs/heads/ACCUMULO-378
Commit: 24d9394027bf7efd7058a74d5546be153cbd6b4f
Parents: 72265f5
Author: Josh Elser <elserj@apache.org>
Authored: Mon May 19 13:52:44 2014 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Mon May 19 13:53:00 2014 -0400

----------------------------------------------------------------------
 .../java/org/apache/accumulo/master/Master.java | 25 ++++++++++----------
 1 file changed, 13 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/24d93940/server/master/src/main/java/org/apache/accumulo/master/Master.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/Master.java b/server/master/src/main/java/org/apache/accumulo/master/Master.java
index 6907a50..5b8bd8d 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/Master.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/Master.java
@@ -942,18 +942,6 @@ public class Master implements LiveTServerSet.Listener, TableObserver,
CurrentSt
       watcher.start();
     }
 
-    // Start the daemon to scan the replication table and make units of work
-    replicationWorkDriver = new ReplicationDriver(this);
-    replicationWorkDriver.start();
-
-    // Start the daemon to assign work to tservers to replicate to our peers
-    try {
-      replicationWorkAssigner = new WorkDriver(this, getConnector());
-    } catch (AccumuloException | AccumuloSecurityException e) {
-      throw new RuntimeException(e);
-    }
-    replicationWorkAssigner.start();
-
     // Once we are sure the upgrade is complete, we can safely allow fate use.
     waitForMetadataUpgrade.await();
 
@@ -991,6 +979,19 @@ public class Master implements LiveTServerSet.Listener, TableObserver,
CurrentSt
       UtilWaitThread.sleep(100);
     }
 
+    // Start the daemon to scan the replication table and make units of work
+    replicationWorkDriver = new ReplicationDriver(this);
+    replicationWorkDriver.start();
+
+    // Start the daemon to assign work to tservers to replicate to our peers
+    try {
+      replicationWorkAssigner = new WorkDriver(this, getConnector());
+    } catch (AccumuloException | AccumuloSecurityException e) {
+      log.error("Caught exception trying to initialize replication WorkDriver", e);
+      throw new RuntimeException(e);
+    }
+    replicationWorkAssigner.start();
+
     // Start the replication coordinator which assigns tservers to service replication requests
     ReplicationCoordinator.Processor<ReplicationCoordinator.Iface> replicationCoordinatorProcessor
= new ReplicationCoordinator.Processor<ReplicationCoordinator.Iface>(
         TraceWrap.service(new MasterReplicationCoordinator(this, getSystemConfiguration())));


Mime
View raw message