hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject git commit: HBASE-12146 RegionServerTracker should escape data in log messages
Date Sat, 04 Oct 2014 22:32:20 GMT
Repository: hbase
Updated Branches:
  refs/heads/0.98 85a60fec6 -> a62fbab6f


HBASE-12146 RegionServerTracker should escape data in log messages


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

Branch: refs/heads/0.98
Commit: a62fbab6f5e02d4099b373a625c7235e4b3014f1
Parents: 85a60fe
Author: stack <stack@apache.org>
Authored: Sat Oct 4 15:32:14 2014 -0700
Committer: stack <stack@apache.org>
Committed: Sat Oct 4 15:32:14 2014 -0700

----------------------------------------------------------------------
 .../hadoop/hbase/master/handler/ServerShutdownHandler.java     | 6 ++++--
 .../java/org/apache/hadoop/hbase/regionserver/HRegion.java     | 5 +++--
 .../apache/hadoop/hbase/zookeeper/RecoveringRegionWatcher.java | 2 +-
 .../org/apache/hadoop/hbase/zookeeper/RegionServerTracker.java | 6 +++---
 4 files changed, 11 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/a62fbab6/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/ServerShutdownHandler.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/ServerShutdownHandler.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/ServerShutdownHandler.java
index bbc8a5c..903fd29 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/ServerShutdownHandler.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/ServerShutdownHandler.java
@@ -191,12 +191,14 @@ public class ServerShutdownHandler extends EventHandler {
 
       try {
         if (this.shouldSplitHlog) {
-          LOG.info("Splitting logs for " + serverName + " before assignment.");
           if (distributedLogReplay) {
-            LOG.info("Mark regions in recovery before assignment.");
+            LOG.info("Mark regions in recovery for crashed server " + serverName +
+              " before assignment; regions=" + hris);
             MasterFileSystem mfs = this.services.getMasterFileSystem();
             mfs.prepareLogReplay(serverName, hris);
           } else {
+            LOG.info("Splitting logs for " + serverName +
+              " before assignment; region count=" + hris.size());
             this.services.getMasterFileSystem().splitLog(serverName);
           }
           am.getRegionStates().logSplit(serverName);

http://git-wip-us.apache.org/repos/asf/hbase/blob/a62fbab6/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
index 01dda60..313baca 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
@@ -5881,9 +5881,10 @@ public class HRegion implements HeapSize { // , Writable{
     case BATCH_MUTATE:
     case COMPACT_REGION:
       // when a region is in recovering state, no read, split or merge is allowed
-      if (this.isRecovering() && (this.disallowWritesInRecovering ||
+      if (isRecovering() && (this.disallowWritesInRecovering ||
               (op != Operation.PUT && op != Operation.DELETE && op != Operation.BATCH_MUTATE)))
{
-        throw new RegionInRecoveryException(this.getRegionNameAsString() + " is recovering");
+        throw new RegionInRecoveryException(this.getRegionNameAsString() +
+          " is recovering; cannot take reads");
       }
       break;
     default:

http://git-wip-us.apache.org/repos/asf/hbase/blob/a62fbab6/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoveringRegionWatcher.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoveringRegionWatcher.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoveringRegionWatcher.java
index b0e7105..a07bd2f 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoveringRegionWatcher.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoveringRegionWatcher.java
@@ -63,7 +63,7 @@ public class RecoveringRegionWatcher extends ZooKeeperListener {
       region.setRecovering(false);
     }
 
-    LOG.info(path + " znode deleted. Region: " + regionName + " completes recovery.");
+    LOG.info(path + " deleted; " + regionName + " recovered.");
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/hbase/blob/a62fbab6/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/RegionServerTracker.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/RegionServerTracker.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/RegionServerTracker.java
index 450f11d..5b67b80 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/RegionServerTracker.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/RegionServerTracker.java
@@ -87,13 +87,13 @@ public class RegionServerTracker extends ZooKeeperListener {
           try {
             String nodePath = ZKUtil.joinZNode(watcher.rsZNode, n);
             byte[] data = ZKUtil.getData(watcher, nodePath);
-            if (LOG.isDebugEnabled()) {
-              LOG.debug("RS node: " + nodePath + " data: " + Bytes.toString(data));
-            }
             if (data != null && data.length > 0 && ProtobufUtil.isPBMagicPrefix(data))
{
               int magicLen = ProtobufUtil.lengthOfPBMagic();
               rsInfoBuilder.mergeFrom(data, magicLen, data.length - magicLen);
             }
+            if (LOG.isDebugEnabled()) {
+              LOG.debug("Added tracking of RS " + nodePath);
+            }
           } catch (KeeperException e) {
             LOG.warn("Get Rs info port from ephemeral node", e);
           } catch (IOException e) {


Mime
View raw message