You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ns...@apache.org on 2011/10/11 04:18:57 UTC

svn commit: r1181549 - /hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java

Author: nspiegelberg
Date: Tue Oct 11 02:18:54 2011
New Revision: 1181549

URL: http://svn.apache.org/viewvc?rev=1181549&view=rev
Log:
Title: Change the logging level for NotServingRegionException

Summary:Currently the NotServingRegionException is logged at the error level which creates a lot of noise in the scribe logs. Change the logging level for this to info.

Task ID: #586756

Blame Rev:

Reviewed by: kannan

CC:hbase@lists

Test Plan:Started HBaseTests on a dev cluster. While the tests were running, stopped the regionserver. Started it again after a few minutes. This caused the regions to move among the region servers. Since the client had the old location of the regionserver:region mapping, it tried to contact the old region server. This induced the NotServingRegionException. Checked logging for this exception before and after making the change.
With this change the exception will be logged as an info with the classname and the region that caused the exception.
Revert Plan:

Tags:hbase

- begin *PUBLIC* platform impact section -
Bugzilla: #
- end platform impact -

Differential Revision: 261736

Modified:
    hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java

Modified: hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java?rev=1181549&r1=1181548&r2=1181549&view=diff
==============================================================================
--- hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java (original)
+++ hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java Tue Oct 11 02:18:54 2011
@@ -811,10 +811,14 @@ public class HRegionServer implements HR
    * @return Throwable converted to an IOE; methods can only let out IOEs.
    */
   private Throwable cleanup(final Throwable t, final String msg) {
-    if (msg == null) {
-      LOG.error("", RemoteExceptionHandler.checkThrowable(t));
+    if (t instanceof NotServingRegionException)
+        LOG.info(t.toString());
     } else {
-      LOG.error(msg, RemoteExceptionHandler.checkThrowable(t));
+        if (msg == null) {
+          LOG.error("", RemoteExceptionHandler.checkThrowable(t));
+        } else {
+        LOG.error(msg, RemoteExceptionHandler.checkThrowable(t));
+        }
     }
     if (!checkOOME(t)) {
       checkFileSystem();