hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r613069 - /lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMaster.java
Date Fri, 18 Jan 2008 06:17:24 GMT
Author: jimk
Date: Thu Jan 17 22:17:23 2008
New Revision: 613069

URL: http://svn.apache.org/viewvc?rev=613069&view=rev
Log:
HADOOP-2525 Master changes to prevent looping

Modified:
    lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMaster.java

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMaster.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMaster.java?rev=613069&r1=613068&r2=613069&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMaster.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMaster.java Thu
Jan 17 22:17:23 2008
@@ -1036,7 +1036,8 @@
     startServiceThreads();
     /* Main processing loop */
     try {
-      for (RegionServerOperation op = null; !closed.get(); ) {
+      while (!closed.get()) {
+        RegionServerOperation op = null;
         if (shutdownRequested && serversToServerInfo.size() == 0) {
           startShutdown();
           break;
@@ -1951,7 +1952,6 @@
     private String deadServerName;
     private Path oldLogDir;
     private boolean logSplit;
-    private boolean rootChecked;
     private boolean rootRescanned;
 
     private class ToDoEntry {
@@ -1976,7 +1976,6 @@
       this.deadServer = serverInfo.getServerAddress();
       this.deadServerName = this.deadServer.toString();
       this.logSplit = false;
-      this.rootChecked = false;
       this.rootRescanned = false;
       StringBuilder dirName = new StringBuilder("log_");
       dirName.append(deadServer.getBindAddress());
@@ -2147,10 +2146,9 @@
     @Override
     protected boolean process() throws IOException {
       LOG.info("process shutdown of server " + deadServer + ": logSplit: " +
-          this.logSplit + ", rootChecked: " + this.rootChecked +
-          ", rootRescanned: " + this.rootRescanned + ", numberOfMetaRegions: " +
-          numberOfMetaRegions.get() + ", onlineMetaRegions.size(): " +
-          onlineMetaRegions.size());
+          this.logSplit + ", rootRescanned: " + this.rootRescanned +
+          ", numberOfMetaRegions: " + numberOfMetaRegions.get() +
+          ", onlineMetaRegions.size(): " + onlineMetaRegions.size());
 
       if (!logSplit) {
         // Process the old log file
@@ -2167,13 +2165,11 @@
         logSplit = true;
       }
 
-      if (!rootChecked) {
-        if (!rootAvailable()) {
-          // Return true so that worker does not put this request back on the
-          // toDoQueue.
-          // rootAvailable() has already put it on the delayedToDoQueue
-          return true;
-        }
+      if (!rootAvailable()) {
+        // Return true so that worker does not put this request back on the
+        // toDoQueue.
+        // rootAvailable() has already put it on the delayedToDoQueue
+        return true;
       }
 
       if (!rootRescanned) {
@@ -2184,15 +2180,6 @@
         for (int tries = 0; tries < numRetries; tries ++) {
           if (closed.get()) {
             return true;
-          }
-          if (rootRegionLocation.get() == null || !rootScanned) {
-            // We can't proceed until the root region is online and has been scanned
-            
-            if (LOG.isDebugEnabled()) {
-              LOG.debug("process server shutdown scanning root region " +
-              "cancelled because rootRegionLocation is null");
-            }
-            return false;
           }
           server = connection.getHRegionConnection(rootRegionLocation.get());
           scannerId = -1L;



Mime
View raw message