hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1521315 - in /hbase/trunk: hbase-client/src/main/java/org/apache/hadoop/hbase/client/ hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ hbase-server/src/main/java/org/apache/hadoop/hbase/master/ hbase-server/src/main/java/org/a...
Date Mon, 09 Sep 2013 23:21:13 GMT
Author: stack
Date: Mon Sep  9 23:21:13 2013
New Revision: 1521315

URL: http://svn.apache.org/r1521315
Log:
HBASE-9476 Yet more master log cleanup

Modified:
    hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java
    hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKAssign.java
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionStates.java
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/SplitLogManager.java
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/OpenedRegionHandler.java

Modified: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java?rev=1521315&r1=1521314&r2=1521315&view=diff
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java
(original)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ClientScanner.java
Mon Sep  9 23:21:13 2013
@@ -27,14 +27,13 @@ import org.apache.hadoop.classification.
 import org.apache.hadoop.classification.InterfaceStability;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.Cell;
-import org.apache.hadoop.hbase.KeyValueUtil;
-import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.DoNotRetryIOException;
 import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.HRegionInfo;
-import org.apache.hadoop.hbase.KeyValue;
+import org.apache.hadoop.hbase.KeyValueUtil;
 import org.apache.hadoop.hbase.NotServingRegionException;
+import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.UnknownScannerException;
 import org.apache.hadoop.hbase.client.metrics.ScanMetrics;
 import org.apache.hadoop.hbase.exceptions.OutOfOrderScannerNextException;
@@ -216,14 +215,14 @@ public class ClientScanner extends Abstr
             checkScanStopRow(endKey) ||
             done) {
           close();
-          if (LOG.isDebugEnabled()) {
-            LOG.debug("Finished " + this.currentRegion);
+          if (LOG.isTraceEnabled()) {
+            LOG.trace("Finished " + this.currentRegion);
           }
           return false;
         }
         localStartKey = endKey;
-        if (LOG.isDebugEnabled()) {
-          LOG.debug("Finished " + this.currentRegion);
+        if (LOG.isTraceEnabled()) {
+          LOG.trace("Finished " + this.currentRegion);
         }
       } else {
         localStartKey = this.scan.getStartRow();

Modified: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKAssign.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKAssign.java?rev=1521315&r1=1521314&r2=1521315&view=diff
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKAssign.java
(original)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKAssign.java
Mon Sep  9 23:21:13 2013
@@ -402,8 +402,10 @@ public class ZKAssign {
   public static boolean deleteNode(ZooKeeperWatcher zkw, String encodedRegionName,
       EventType expectedState, int expectedVersion)
   throws KeeperException, KeeperException.NoNodeException {
-    LOG.debug(zkw.prefix("Deleting existing unassigned " +
+    if (LOG.isTraceEnabled()) {
+    	LOG.trace(zkw.prefix("Deleting existing unassigned " +
       "node " + encodedRegionName + " in expected state " + expectedState));
+    }
     String node = getNodeName(zkw, encodedRegionName);
     zkw.sync(node);
     Stat stat = new Stat();

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java?rev=1521315&r1=1521314&r2=1521315&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
Mon Sep  9 23:21:13 2013
@@ -477,7 +477,7 @@ public class AssignmentManager extends Z
 
     // If we found user regions out on cluster, its a failover.
     if (failover) {
-      LOG.info("Found regions out on cluster or in RIT; failover");
+      LOG.info("Found regions out on cluster or in RIT; presuming failover");
       // Process list of dead servers and regions in RIT.
       // See HBASE-4580 for more information.
       processDeadServersAndRecoverLostRegions(deadServers);
@@ -803,11 +803,11 @@ public class AssignmentManager extends Z
     long startTime = System.currentTimeMillis();
     if (LOG.isDebugEnabled()) {
       boolean lateEvent = createTime < (startTime - 15000);
-      LOG.debug("Handling transition=" + rt.getEventType() +
+      LOG.debug("Handling " + rt.getEventType() +
         ", server=" + sn + ", region=" +
         (prettyPrintedRegionName == null ? "null" : prettyPrintedRegionName) +
         (lateEvent ? ", which is more than 15 seconds late" : "") +
-        ", current state from region state map =" + regionState);
+        ", current_state=" + regionState);
     }
     // We don't do anything for this event,
     // so separate it out, no need to lock/unlock anything
@@ -2198,9 +2198,9 @@ public class AssignmentManager extends Z
         LOG.warn("Can't find a destination for " + encodedName);
         return null;
       }
-      LOG.debug("No previous transition plan was found (or we are ignoring " +
+      LOG.debug("No previous transition plan found (or ignoring " +
         "an existing plan) for " + region.getRegionNameAsString() +
-        " so generated a random one; " + randomPlan + "; " +
+        "; generated random plan=" + randomPlan + "; " +
         serverManager.countOfRegionServers() +
                " (online=" + serverManager.getOnlineServers().size() +
                ", available=" + destServers.size() + ") available servers" +
@@ -3105,9 +3105,8 @@ public class AssignmentManager extends Z
     if (addressFromZK != null) {
       // if we get something from ZK, we will use the data
       boolean matchZK = addressFromZK.equals(serverName);
-      LOG.debug("based on ZK, current region=" + hri.getRegionNameAsString() +
-          " is on server=" + addressFromZK +
-          " server being checked=: " + serverName);
+      LOG.debug("Checking region=" + hri.getRegionNameAsString() + ", zk server=" + addressFromZK
+
+        " current=" + serverName + ", matches=" + matchZK);
       return matchZK;
     }
 

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java?rev=1521315&r1=1521314&r2=1521315&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java (original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java Mon
Sep  9 23:21:13 2013
@@ -1072,12 +1072,11 @@ MasterServices, Server {
       }
     }
 
-    int assigned = 0;
     boolean beingExpired = false;
 
     status.setStatus("Assigning System Regions");
 
-    for(Map.Entry<HRegionInfo, ServerName> entry: allRegions.entrySet()) {
+    for (Map.Entry<HRegionInfo, ServerName> entry: allRegions.entrySet()) {
       HRegionInfo regionInfo = entry.getKey();
       ServerName currServer = entry.getValue();
 
@@ -1097,14 +1096,12 @@ MasterServices, Server {
         assignmentManager.assign(regionInfo, true);
         // Make sure a region location is set.
         this.assignmentManager.waitForAssignment(regionInfo);
-        assigned++;
         if (beingExpired && this.distributedLogReplay) {
           // In Replay WAL Mode, we need the new region server online
           this.fileSystemManager.splitLog(currServer);
         }
       } else if (rit && !regionLocation) {
         if (!waitVerifiedRegionLocation(regionInfo)) return;
-        assigned++;
       } else {
         // Region already assigned. We didn't assign it. Add to in-memory state.
         this.assignmentManager.regionOnline(regionInfo, currServer);
@@ -1113,7 +1110,7 @@ MasterServices, Server {
       if (!this.assignmentManager.getZKTable().isEnabledTable(regionInfo.getTableName()))
{
         this.assignmentManager.setEnabledTable(regionInfo.getTableName());
       }
-      LOG.info("System Regions assigned=" + assigned + ", rit=" + rit +
+      LOG.info("System region " + regionInfo.getRegionNameAsString() + " assigned, rit="
+ rit +
         ", location=" + catalogTracker.getMetaLocation());
     }
     status.setStatus("System Regions assigned.");
@@ -1146,7 +1143,7 @@ MasterServices, Server {
               .getAdmin(currServer),
               regionInfo.getRegionName()) != null;
     } catch (IOException e) {
-      LOG.info("Failed to contact server: "+currServer, e);
+      LOG.info("Failed verifying location=" + currServer + ", exception=" + e);
     }
     return false;
   }

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionStates.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionStates.java?rev=1521315&r1=1521314&r2=1521315&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionStates.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionStates.java
Mon Sep  9 23:21:13 2013
@@ -260,7 +260,7 @@ public class RegionStates {
       hri, state, System.currentTimeMillis(), newServerName);
     RegionState oldState = regionStates.put(regionName, regionState);
     if (oldState == null || oldState.getState() != regionState.getState()) {
-      LOG.info("Transitioned from " + oldState + " to " + regionState);
+      LOG.info("Transitioned " + oldState + " to " + regionState);
     }
     if (newServerName != null || (
         state != State.PENDING_CLOSE && state != State.CLOSING)) {

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java?rev=1521315&r1=1521314&r2=1521315&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
Mon Sep  9 23:21:13 2013
@@ -470,13 +470,13 @@ public class ServerManager {
       return;
     }
     if (!this.onlineServers.containsKey(serverName)) {
-      LOG.warn("Received expiration of " + serverName +
-        " but server is not currently online");
+      LOG.warn("Expiration of " + serverName +
+        " but server not online");
     }
     if (this.deadservers.isDeadServer(serverName)) {
       // TODO: Can this happen?  It shouldn't be online in this case?
-      LOG.warn("Received expiration of " + serverName +
-          " but server shutdown is already in progress");
+      LOG.warn("Expiration of " + serverName +
+          " but server shutdown already in progress");
       return;
     }
     // Remove the server from the known servers lists and update load info BUT
@@ -552,7 +552,7 @@ public class ServerManager {
     }
 
     if (!services.getAssignmentManager().isFailoverCleanupDone()) {
-      LOG.info("AssignmentManager hasn't finished failover cleanup");
+      LOG.info("AssignmentManager hasn't finished failover cleanup; waiting");
     }
 
     for(ServerName tmpServerName : requeuedDeadServers.keySet()){

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/SplitLogManager.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/SplitLogManager.java?rev=1521315&r1=1521314&r2=1521315&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/SplitLogManager.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/SplitLogManager.java
Mon Sep  9 23:21:13 2013
@@ -221,16 +221,16 @@ public class SplitLogManager extends Zoo
     this.timeout = conf.getInt("hbase.splitlog.manager.timeout", DEFAULT_TIMEOUT);
     this.unassignedTimeout =
       conf.getInt("hbase.splitlog.manager.unassigned.timeout", DEFAULT_UNASSIGNED_TIMEOUT);
-    LOG.info("timeout=" + timeout + ", unassigned timeout=" + unassignedTimeout);
+    this.distributedLogReplay = this.conf.getBoolean(HConstants.DISTRIBUTED_LOG_REPLAY_KEY,
+    	      HConstants.DEFAULT_DISTRIBUTED_LOG_REPLAY_CONFIG);
+    LOG.info("Timeout=" + timeout + ", unassigned timeout=" + unassignedTimeout +
+      ", distributedLogReplay=" + this.distributedLogReplay);
 
     this.serverName = serverName;
     this.timeoutMonitor = new TimeoutMonitor(
       conf.getInt("hbase.splitlog.manager.timeoutmonitor.period", 1000), stopper);
 
     this.failedDeletions = Collections.synchronizedSet(new HashSet<String>());
-    this.distributedLogReplay = this.conf.getBoolean(HConstants.DISTRIBUTED_LOG_REPLAY_KEY,
-      HConstants.DEFAULT_DISTRIBUTED_LOG_REPLAY_CONFIG);
-    LOG.info("distributedLogReplay = " + this.distributedLogReplay);
 
     if (!masterRecovery) {
       Threads.setDaemonThreadRunning(timeoutMonitor.getThread(), serverName

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/OpenedRegionHandler.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/OpenedRegionHandler.java?rev=1521315&r1=1521314&r2=1521315&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/OpenedRegionHandler.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/OpenedRegionHandler.java
Mon Sep  9 23:21:13 2013
@@ -124,7 +124,7 @@ public class OpenedRegionHandler extends
   }
 
   private boolean deleteOpenedNode(int expectedVersion) {
-    debugLog(regionInfo, "Handling OPENED event for " +
+    debugLog(regionInfo, "Handling OPENED of " +
       this.regionInfo.getShortNameToLog() + " from " + this.sn.toString() +
       "; deleting unassigned node");
     try {



Mime
View raw message