hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ecl...@apache.org
Subject svn commit: r1538843 - in /hbase/branches/0.96: hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java
Date Tue, 05 Nov 2013 00:22:27 GMT
Author: eclark
Date: Tue Nov  5 00:22:27 2013
New Revision: 1538843

URL: http://svn.apache.org/r1538843
Log:
HBASE-9859 Canary Shouldn't go off if the table being read from is disabled

Modified:
    hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
    hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java

Modified: hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java?rev=1538843&r1=1538842&r2=1538843&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
(original)
+++ hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
Tue Nov  5 00:22:27 2013
@@ -60,6 +60,7 @@ import org.apache.hadoop.hbase.RegionToo
 import org.apache.hadoop.hbase.ServerName;
 import org.apache.hadoop.hbase.Stoppable;
 import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.TableNotEnabledException;
 import org.apache.hadoop.hbase.TableNotFoundException;
 import org.apache.hadoop.hbase.ZooKeeperConnectionException;
 import org.apache.hadoop.hbase.client.MetaScanner.MetaScannerVisitor;
@@ -1025,7 +1026,7 @@ public class HConnectionManager {
       // disabled tables should not be desirable.  This will ensure that an exception is
thrown when
       // the first time a disabled table is interacted with.
       if (isTableDisabled(tableName)) {
-        throw new DoNotRetryIOException(tableName.getNameAsString() + " is disabled.");
+        throw new TableNotEnabledException(tableName.getNameAsString() + " is disabled.");
       }
 
       return locateRegion(tableName, row, false, true);

Modified: hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java?rev=1538843&r1=1538842&r2=1538843&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java
(original)
+++ hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java
Tue Nov  5 00:22:27 2013
@@ -34,11 +34,13 @@ import org.apache.commons.lang.time.Stop
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.DoNotRetryIOException;
 import org.apache.hadoop.hbase.HColumnDescriptor;
 import org.apache.hadoop.hbase.HRegionInfo;
 import org.apache.hadoop.hbase.HTableDescriptor;
 import org.apache.hadoop.hbase.ServerName;
 import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.TableNotEnabledException;
 import org.apache.hadoop.hbase.TableNotFoundException;
 import org.apache.hadoop.hbase.client.Get;
 import org.apache.hadoop.hbase.client.HBaseAdmin;
@@ -616,6 +618,14 @@ public final class Canary implements Too
             stopWatch.stop();
           }
           this.getSink().publishReadTiming(tableName, serverName, stopWatch.getTime());
+        } catch (TableNotFoundException tnfe) {
+          // This is ignored because it doesn't imply that the regionserver is dead
+        } catch (TableNotEnabledException tnee) {
+          // This is considered a success since we got a response.
+          LOG.debug("The targeted table was disabled.  Assuming success.");
+        } catch (DoNotRetryIOException dnrioe) {
+            this.getSink().publishReadFailure(tableName, serverName);
+            LOG.error(dnrioe);
         } catch (IOException e) {
           this.getSink().publishReadFailure(tableName, serverName);
           LOG.error(e);



Mime
View raw message