accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1431021 - /accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/Master.java
Date Wed, 09 Jan 2013 19:33:36 GMT
Author: ecn
Date: Wed Jan  9 19:33:35 2013
New Revision: 1431021

URL: http://svn.apache.org/viewvc?rev=1431021&view=rev
Log:
ACCUMULO-950 start fate before logs can be recovered

Modified:
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/Master.java

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/Master.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/Master.java?rev=1431021&r1=1431020&r2=1431021&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/Master.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/Master.java Wed
Jan  9 19:33:35 2013
@@ -2129,6 +2129,26 @@ public class Master implements LiveTServ
     
     tserverSet.startListeningForTabletServerChanges();
 
+    // TODO: add shutdown for fate object
+    try {
+      final AgeOffStore<Master> store = new AgeOffStore<Master>(new org.apache.accumulo.fate.ZooStore<Master>(ZooUtil.getRoot(instance)
+ Constants.ZFATE,
+          ZooReaderWriter.getRetryingInstance()), 1000 * 60 * 60 * 8);
+      
+      fate = new Fate<Master>(this, store, 4);
+      
+      SimpleTimer.getInstance().schedule(new TimerTask() {
+        
+        @Override
+        public void run() {
+          store.ageOff();
+        }
+      }, 63000, 63000);
+    } catch (KeeperException e) {
+      throw new IOException(e);
+    } catch (InterruptedException e) {
+      throw new IOException(e);
+    }
+    
     ZooReaderWriter.getInstance().getChildren(zroot + Constants.ZRECOVERY, new Watcher()
{
       @Override
       public void process(WatchedEvent event) {
@@ -2152,26 +2172,6 @@ public class Master implements LiveTServ
       watcher.start();
     }
     
-    // TODO: add shutdown for fate object
-    try {
-      final AgeOffStore<Master> store = new AgeOffStore<Master>(new org.apache.accumulo.fate.ZooStore<Master>(ZooUtil.getRoot(instance)
+ Constants.ZFATE,
-          ZooReaderWriter.getRetryingInstance()), 1000 * 60 * 60 * 8);
-      
-      fate = new Fate<Master>(this, store, 4);
-      
-      SimpleTimer.getInstance().schedule(new TimerTask() {
-        
-        @Override
-        public void run() {
-          store.ageOff();
-        }
-      }, 63000, 63000);
-    } catch (KeeperException e) {
-      throw new IOException(e);
-    } catch (InterruptedException e) {
-      throw new IOException(e);
-    }
-    
     Processor<Iface> processor = new Processor<Iface>(TraceWrap.service(new MasterClientServiceHandler()));
     clientService = TServerUtils.startServer(getSystemConfiguration(), Property.MASTER_CLIENTPORT,
processor, "Master", "Master Client Service Handler", null,
         Property.MASTER_MINTHREADS, Property.MASTER_THREADCHECK, Property.GENERAL_MAX_MESSAGE_SIZE).server;



Mime
View raw message