hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jxi...@apache.org
Subject git commit: HBASE-12216 Lower closed region logging level
Date Thu, 09 Oct 2014 21:00:56 GMT
Repository: hbase
Updated Branches:
  refs/heads/master f75785af5 -> 72c8c62aa


HBASE-12216 Lower closed region logging level


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

Branch: refs/heads/master
Commit: 72c8c62aa1a7e85a2ae5f59268e5c00967565dad
Parents: f75785a
Author: Jimmy Xiang <jxiang@cloudera.com>
Authored: Thu Oct 9 09:21:32 2014 -0700
Committer: Jimmy Xiang <jxiang@cloudera.com>
Committed: Thu Oct 9 14:00:24 2014 -0700

----------------------------------------------------------------------
 .../apache/hadoop/hbase/master/RegionState.java |  4 ++--
 .../hadoop/hbase/master/AssignmentManager.java  | 22 ++++++++++++--------
 .../hbase/regionserver/HRegionServer.java       |  2 +-
 3 files changed, 16 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/72c8c62a/hbase-client/src/main/java/org/apache/hadoop/hbase/master/RegionState.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/master/RegionState.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/master/RegionState.java
index 06a6b99..dbcbaeb 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/master/RegionState.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/master/RegionState.java
@@ -304,8 +304,8 @@ public class RegionState {
     return isOnServer(sn) && (isSplitting() || isSplit());
   }
 
-  public boolean isClosingOnServer(final ServerName sn) {
-    return isOnServer(sn) && isClosing();
+  public boolean isClosingOrClosedOnServer(final ServerName sn) {
+    return isOnServer(sn) && (isClosing() || isClosed());
   }
 
   public boolean isOpeningOrFailedOpenOnServer(final ServerName sn) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/72c8c62a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
index 77c32c4..7c7f0b6 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
@@ -2139,16 +2139,20 @@ public class AssignmentManager {
 
   private String onRegionClosed(final RegionState current,
       final HRegionInfo hri, final ServerName serverName) {
-    // We didn't check if the region is already closed/offline on the server
-    // as we did for other transitions to handle reportRegionTransition RPC retry.
-    // There are two reasons. 1. Closed/offline states are transient. Region will be
-    // usually assigned right after closed. When a RPC retry comes in, the region may
-    // already have moved away from closed state. 2. On the region server side, we
-    // don't care much about the response for this transition. We only make sure
-    // master has got and processed this report, either successfully or not.
-    if (current == null || !current.isClosingOnServer(serverName)) {
+    // Region will be usually assigned right after closed. When a RPC retry comes
+    // in, the region may already have moved away from closed state. However, on the
+    // region server side, we don't care much about the response for this transition.
+    // We only make sure master has got and processed this report, either
+    // successfully or not. So this is fine, not a problem at all.
+    if (current == null || !current.isClosingOrClosedOnServer(serverName)) {
       return hri.getShortNameToLog() + " is not closing on " + serverName;
     }
+
+    // Just return in case of retrying
+    if (current.isClosed()) {
+      return null;
+    }
+
     if (getTableStateManager().isTableState(hri.getTable(), TableState.State.DISABLED,
         TableState.State.DISABLING) || replicasToClose.contains(hri)) {
       offlineDisabledRegion(hri);
@@ -2734,7 +2738,7 @@ public class AssignmentManager {
         errorMsg = "Unexpected transition code " + code;
       }
       if (errorMsg != null) {
-        LOG.error("Failed to transition region from " + current + " on "
+        LOG.info("Could not transition region from " + current + " on "
           + code + " by " + serverName + ": " + errorMsg);
       }
       return errorMsg;

http://git-wip-us.apache.org/repos/asf/hbase/blob/72c8c62a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
index 7c1e805..b9d3fb5 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
@@ -2591,7 +2591,7 @@ public class HRegionServer extends HasThread implements
     }
 
     if (actualRegion == null) {
-      LOG.error("Received CLOSE for a region which is not online, and we're not opening.");
+      LOG.debug("Received CLOSE for a region which is not online, and we're not opening.");
       this.regionsInTransitionInRS.remove(encodedName.getBytes());
       // The master deletes the znode when it receives this exception.
       throw new NotServingRegionException("The region " + encodedName +


Mime
View raw message