hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject [2/2] hbase git commit: Exceptions are not logging identifying details like region; makes it hard to debug who is problem
Date Sat, 06 May 2017 18:24:03 GMT
Exceptions are not logging identifying details like region; makes it hard to debug who is problem


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

Branch: refs/heads/HBASE-14614
Commit: 3a6d8fc498b7c6089b446f56c15fb9fd803932b3
Parents: ca9ef7a
Author: Michael Stack <stack@apache.org>
Authored: Sat May 6 11:22:57 2017 -0700
Committer: Michael Stack <stack@apache.org>
Committed: Sat May 6 11:22:57 2017 -0700

----------------------------------------------------------------------
 .../master/assignment/AssignmentManager.java      | 18 ++++++++----------
 .../hbase/master/assignment/RegionStates.java     |  2 +-
 2 files changed, 9 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/3a6d8fc4/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java
index 2986868..ed55235 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java
@@ -983,7 +983,7 @@ public class AssignmentManager implements ServerListener {
       }
     } catch (UnexpectedStateException e) {
       final ServerName serverName = serverNode.getServerName();
-      LOG.warn("Killing " + serverName + ": " + e.getMessage());
+      LOG.warn("KILLING " + serverName + ": " + e.getMessage());
       killRegionServer(serverNode);
     }
   }
@@ -1003,25 +1003,23 @@ public class AssignmentManager implements ServerListener {
         synchronized (regionNode) {
           if (regionNode.isInState(State.OPENING, State.OPEN)) {
             if (!regionNode.getRegionLocation().equals(serverName)) {
-              throw new UnexpectedStateException(
-                "Reported OPEN on server=" + serverName +
-                " but state found says server=" + regionNode.getRegionLocation());
+              throw new UnexpectedStateException(regionNode.toString() +
+                "reported OPEN on server=" + serverName +
+                " but state has otherwise.");
             } else if (regionNode.isInState(State.OPENING)) {
               try {
                 if (!reportTransition(regionNode, serverNode, TransitionCode.OPENED, 0))
{
-                  LOG.warn("Reported OPEN on server=" + serverName +
-                    " but state found says " + regionNode + " and NO procedure is running");
+                  LOG.warn(regionNode.toString() + " reported OPEN on server=" + serverName
+
+                    " but state has otherwise AND NO procedure is running");
                 }
               } catch (UnexpectedStateException e) {
-                LOG.warn("Unexpected exception while trying to report " + regionNode +
-                  " as open: " + e.getMessage(), e);
+                LOG.warn(regionNode.toString() + " reported unexpteced OPEN: " + e.getMessage(),
e);
               }
             }
           } else if (!regionNode.isInState(State.CLOSING, State.SPLITTING)) {
             // TODO: We end up killing the RS if we get a report while we already
             // transitioned to close or split. we should have a timeout/timestamp to compare
-            throw new UnexpectedStateException(
-                "Reported OPEN but state found says " + regionNode.getState());
+            throw new UnexpectedStateException(regionNode.toString() + " reported unexpected
OPEN");
           }
         }
       }

http://git-wip-us.apache.org/repos/asf/hbase/blob/3a6d8fc4/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionStates.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionStates.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionStates.java
index aa2627c..1c852c9 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionStates.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionStates.java
@@ -173,7 +173,7 @@ public class RegionStates {
     public ServerName setRegionLocation(final ServerName serverName) {
       ServerName lastRegionLocation = this.regionLocation;
       if (serverName == null) {
-        LOG.debug("REMOVE tracking when we are set to null", new Throwable("DEBUG"));
+        LOG.debug("REMOVE tracking when we are set to null " + this, new Throwable("DEBUG"));
       }
       this.regionLocation = serverName;
       this.lastUpdate = EnvironmentEdgeManager.currentTime();


Mime
View raw message