hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdcry...@apache.org
Subject svn commit: r1141289 - in /hbase/branches/0.90: CHANGES.txt src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Date Wed, 29 Jun 2011 22:21:18 GMT
Author: jdcryans
Date: Wed Jun 29 22:21:18 2011
New Revision: 1141289

URL: http://svn.apache.org/viewvc?rev=1141289&view=rev
Log:
 HBASE-3984  CT.verifyRegionLocation isn't doing a very good check,
             can delay cluster recovery

Modified:
    hbase/branches/0.90/CHANGES.txt
    hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
    hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java

Modified: hbase/branches/0.90/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/CHANGES.txt?rev=1141289&r1=1141288&r2=1141289&view=diff
==============================================================================
--- hbase/branches/0.90/CHANGES.txt (original)
+++ hbase/branches/0.90/CHANGES.txt Wed Jun 29 22:21:18 2011
@@ -49,6 +49,8 @@ Release 0.90.4 - Unreleased
    HBASE-4035  Fix local-master-backup.sh - parameter order wrong (Lars George)
    HBASE-4020  "testWritesWhileGetting" unit test needs to be fixed.
                (Vandana Ayyalasomayajula)
+   HBASE-3984  CT.verifyRegionLocation isn't doing a very good check,
+               can delay cluster recovery
 
   IMPROVEMENT
    HBASE-3882  hbase-config.sh needs to be updated so it can auto-detects the

Modified: hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java?rev=1141289&r1=1141288&r2=1141289&view=diff
==============================================================================
--- hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
(original)
+++ hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
Wed Jun 29 22:21:18 2011
@@ -1042,7 +1042,8 @@ public class AssignmentManager extends Z
         // succeed anyways; we need a new plan!
         // Transition back to OFFLINE
         state.update(RegionState.State.OFFLINE);
-        // Force a new plan and reassign.  Will return null if no servers.
+        // Force a new plan and reassign.  Will return n
+        // ull if no servers.
         if (getRegionPlan(state, plan.getDestination(), true) == null) {
           LOG.warn("Unable to find a viable location to assign region " +
             state.getRegion().getRegionNameAsString());

Modified: hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java?rev=1141289&r1=1141288&r2=1141289&view=diff
==============================================================================
--- hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
(original)
+++ hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Wed Jun 29 22:21:18 2011
@@ -1629,7 +1629,8 @@ public class HRegionServer implements HR
   @Override
   @QosPriority(priority=HIGH_QOS)
   public HRegionInfo getRegionInfo(final byte[] regionName)
-  throws NotServingRegionException {
+  throws NotServingRegionException, IOException {
+    checkOpen();
     requestCount.incrementAndGet();
     return getRegion(regionName).getRegionInfo();
   }
@@ -1945,9 +1946,9 @@ public class HRegionServer implements HR
 
   public int delete(final byte[] regionName, final List<Delete> deletes)
       throws IOException {
+    checkOpen();
     // Count of Deletes processed.
     int i = 0;
-    checkOpen();
     HRegion region = null;
     try {
       boolean writeToWAL = true;
@@ -2068,6 +2069,7 @@ public class HRegionServer implements HR
   @Override
   public void bulkLoadHFile(String hfilePath, byte[] regionName,
       byte[] familyName) throws IOException {
+    checkOpen();
     HRegion region = getRegion(regionName);
     region.bulkLoadHFile(hfilePath, familyName);
   }
@@ -2183,6 +2185,7 @@ public class HRegionServer implements HR
   @QosPriority(priority=HIGH_QOS)
   public void flushRegion(HRegionInfo regionInfo)
       throws NotServingRegionException, IOException {
+    checkOpen();
     LOG.info("Flushing " + regionInfo.getRegionNameAsString());
     HRegion region = getRegion(regionInfo.getRegionName());
     region.flushcache();
@@ -2198,6 +2201,7 @@ public class HRegionServer implements HR
   @Override
   public void splitRegion(HRegionInfo regionInfo, byte[] splitPoint)
       throws NotServingRegionException, IOException {
+    checkOpen();
     HRegion region = getRegion(regionInfo.getRegionName());
     region.flushcache();
     region.forceSplit(splitPoint);
@@ -2212,6 +2216,7 @@ public class HRegionServer implements HR
   @QosPriority(priority=HIGH_QOS)
   public void compactRegion(HRegionInfo regionInfo, boolean major)
       throws NotServingRegionException, IOException {
+    checkOpen();
     HRegion region = getRegion(regionInfo.getRegionName());
     compactSplitThread.requestCompaction(region, major, "User-triggered "
         + (major ? "major " : "") + "compaction",
@@ -2514,13 +2519,14 @@ public class HRegionServer implements HR
   @Override
   @QosPriority(priority=HIGH_QOS)
   public HServerInfo getHServerInfo() throws IOException {
+    checkOpen();
     return serverInfo;
   }
 
   @SuppressWarnings("unchecked")
   @Override
   public MultiResponse multi(MultiAction multi) throws IOException {
-
+    checkOpen();
     MultiResponse response = new MultiResponse();
 
     for (Map.Entry<byte[], List<Action>> e : multi.actions.entrySet()) {
@@ -2615,6 +2621,7 @@ public class HRegionServer implements HR
    */
   @Override
   public MultiPutResponse multiPut(MultiPut puts) throws IOException {
+    checkOpen();
     MultiPutResponse resp = new MultiPutResponse();
 
     // do each region as it's own.
@@ -2716,6 +2723,7 @@ public class HRegionServer implements HR
   @Override
   public void replicateLogEntries(final HLog.Entry[] entries)
   throws IOException {
+    checkOpen();
     if (this.replicationHandler == null) return;
     this.replicationHandler.replicateLogEntries(entries);
   }



Mime
View raw message