You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ec...@apache.org on 2011/10/13 21:30:29 UTC

svn commit: r1183047 - in /incubator/accumulo/branches/1.3: docs/src/user_manual/build.sh src/server/src/main/java/org/apache/accumulo/server/master/Master.java

Author: ecn
Date: Thu Oct 13 19:30:28 2011
New Revision: 1183047

URL: http://svn.apache.org/viewvc?rev=1183047&view=rev
Log:
ACCUMULO-35: wait for tablet servers to announce before running the state model; wake up after tablets state chage

Modified:
    incubator/accumulo/branches/1.3/docs/src/user_manual/build.sh
    incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/Master.java

Modified: incubator/accumulo/branches/1.3/docs/src/user_manual/build.sh
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/docs/src/user_manual/build.sh?rev=1183047&r1=1183046&r2=1183047&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/docs/src/user_manual/build.sh (original)
+++ incubator/accumulo/branches/1.3/docs/src/user_manual/build.sh Thu Oct 13 19:30:28 2011
@@ -17,6 +17,7 @@ fi
 pdflatex accumulo_user_manual.tex 
 pdflatex accumulo_user_manual.tex 
 pdflatex accumulo_user_manual.tex 
+pdflatex accumulo_user_manual.tex 
 pdflatex accumulo_user_manual.tex && (
 find . -name '*.aux' -print | xargs rm -f 
 rm -f *.log

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/Master.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/Master.java?rev=1183047&r1=1183046&r2=1183047&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/Master.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/Master.java Thu Oct 13 19:30:28 2011
@@ -1112,6 +1112,12 @@ public class Master implements Listener,
                     for (TServerInstance entry : tserverSet.getCurrentServers()) {
                         currentTServers.put(entry, tserverStatus.get(entry));
                     }
+
+                    if (currentTServers.size() == 0) {
+                    	nextEvent.waitForSomethingInterestingToHappen(TIME_TO_WAIT_BETWEEN_SCANS);
+                    	continue;
+                    }
+                    
                     // Don't move tablets to servers that are shutting down
                     SortedMap<TServerInstance, TabletServerStatus> destinations = new TreeMap<TServerInstance, TabletServerStatus>(currentTServers);
                     destinations.keySet().removeAll(serversToShutdown);
@@ -1198,13 +1204,13 @@ public class Master implements Listener,
                     for (TabletState state : TabletState.values()) {
                         int i = state.ordinal();
                         if (counts[i] > 0 && counts[i] != oldCounts[i]) {
-                            log.info(String.format("[%s]: %d tablets are %s", store.name(), counts[i], state.name()));
+                            nextEvent.somethingInterestingHappened("[%s]: %d tablets are %s", store.name(), counts[i], state.name());
                         }
                     }
                     log.debug(String.format("[%s]: scan time %.2f seconds", store.name(), stats.getScanTime() / 1000.));
                     oldCounts = counts;
                     if (totalUnloaded > 0) {
-                        log.info(String.format("[%s]: %d tablets unloaded", store.name(), totalUnloaded));
+                        nextEvent.somethingInterestingHappened("[%s]: %d tablets unloaded", store.name(), totalUnloaded);
                     }
 
                     flushChanges(destinations, assignments, assigned, assignedToDeadServers, unassigned);