hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1022003 - in /hbase/trunk/src: main/java/org/apache/hadoop/hbase/ipc/ main/java/org/apache/hadoop/hbase/master/ main/java/org/apache/hadoop/hbase/master/handler/ test/java/org/apache/hadoop/hbase/util/
Date Wed, 13 Oct 2010 05:39:13 GMT
Author: stack
Date: Wed Oct 13 05:39:11 2010
New Revision: 1022003

URL: http://svn.apache.org/viewvc?rev=1022003&view=rev
Log:
HBASE-3100 stop splitting in TestMergeTable, and add debug

Modified:
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/HRegionInterface.java
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/handler/OpenedRegionHandler.java
    hbase/trunk/src/test/java/org/apache/hadoop/hbase/util/TestMergeTable.java

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/HRegionInterface.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/HRegionInterface.java?rev=1022003&r1=1022002&r2=1022003&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/HRegionInterface.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/ipc/HRegionInterface.java Wed Oct 13
05:39:11 2010
@@ -312,9 +312,10 @@ public interface HRegionInterface extend
    * Closes the specified region.
    * @param region region to close
    * @return true if closing region, false if not
+   * @throws IOException
    */
   public boolean closeRegion(final HRegionInfo region)
-  throws NotServingRegionException;
+  throws IOException;
 
   // Region administrative methods
 

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java?rev=1022003&r1=1022002&r2=1022003&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java Wed Oct
13 05:39:11 2010
@@ -67,6 +67,7 @@ import org.apache.hadoop.hbase.zookeeper
 import org.apache.hadoop.hbase.zookeeper.ZooKeeperListener;
 import org.apache.hadoop.hbase.zookeeper.ZKUtil.NodeAndData;
 import org.apache.hadoop.io.Writable;
+import org.apache.hadoop.ipc.RemoteException;
 import org.apache.zookeeper.KeeperException;
 
 import com.google.common.util.concurrent.ThreadFactoryBuilder;
@@ -786,9 +787,17 @@ public class AssignmentManager extends Z
     // Send CLOSE RPC
     try {
       serverManager.sendRegionClose(regions.get(region), state.getRegion());
-    } catch (NotServingRegionException e) {
-      LOG.warn("Attempted to close region " + region.getRegionNameAsString() +
-        " but got an NSRE", e);
+    } catch (IOException e) {
+      if (e instanceof RemoteException) {
+        e = ((RemoteException)e).unwrapRemoteException();
+      }
+      if (e instanceof NotServingRegionException) {
+        LOG.warn("Attempted to close region " + region.getRegionNameAsString() +
+          " but got an NSRE", e);
+      }
+      // For now call abort if unexpected exception -- seeing it up in hudson.
+      // St.Ack 20101012
+      this.master.abort("Remote unexpected exception", e);
     } catch (Throwable t) {
       // For now call abort if unexpected exception -- seeing it up in hudson.
       // St.Ack 20101012

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java?rev=1022003&r1=1022002&r2=1022003&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java Wed Oct 13
05:39:11 2010
@@ -31,14 +31,12 @@ import java.util.concurrent.ConcurrentHa
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.util.StringUtils;
 import org.apache.hadoop.hbase.Chore;
 import org.apache.hadoop.hbase.HMsg;
 import org.apache.hadoop.hbase.HRegionInfo;
 import org.apache.hadoop.hbase.HServerAddress;
 import org.apache.hadoop.hbase.HServerInfo;
 import org.apache.hadoop.hbase.HServerLoad;
-import org.apache.hadoop.hbase.NotServingRegionException;
 import org.apache.hadoop.hbase.PleaseHoldException;
 import org.apache.hadoop.hbase.Server;
 import org.apache.hadoop.hbase.Stoppable;
@@ -50,6 +48,8 @@ import org.apache.hadoop.hbase.master.ha
 import org.apache.hadoop.hbase.master.metrics.MasterMetrics;
 import org.apache.hadoop.hbase.regionserver.Leases.LeaseStillHeldException;
 import org.apache.hadoop.hbase.util.Threads;
+import org.apache.hadoop.ipc.RemoteException;
+import org.apache.hadoop.util.StringUtils;
 
 /**
  * The ServerManager class manages info about region servers - HServerInfo,
@@ -542,10 +542,10 @@ public class ServerManager {
    * @param server server to open a region
    * @param regionName region to open
    * @return true if server acknowledged close, false if not
-   * @throws NotServingRegionException
+   * @throws IOException
    */
   public void sendRegionClose(HServerInfo server, HRegionInfo region)
-  throws NotServingRegionException {
+  throws IOException {
     HRegionInterface hri = getServerConnection(server);
     if(hri == null) {
       LOG.warn("Attempting to send CLOSE RPC to server " +

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/handler/OpenedRegionHandler.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/handler/OpenedRegionHandler.java?rev=1022003&r1=1022002&r2=1022003&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/handler/OpenedRegionHandler.java
(original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/handler/OpenedRegionHandler.java
Wed Oct 13 05:39:11 2010
@@ -19,6 +19,8 @@
  */
 package org.apache.hadoop.hbase.master.handler;
 
+import java.io.IOException;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hbase.HRegionInfo;
@@ -35,9 +37,7 @@ import org.apache.zookeeper.KeeperExcept
  */
 public class OpenedRegionHandler extends EventHandler implements TotesHRegionInfo {
   private static final Log LOG = LogFactory.getLog(OpenedRegionHandler.class);
-
   private final AssignmentManager assignmentManager;
-  private final RegionTransitionData data;
   private final HRegionInfo regionInfo;
   private final HServerInfo serverInfo;
   private final OpenedPriority priority;
@@ -60,8 +60,12 @@ public class OpenedRegionHandler extends
       AssignmentManager assignmentManager, RegionTransitionData data,
       HRegionInfo regionInfo, HServerInfo serverInfo) {
     super(server, EventType.RS_ZK_REGION_OPENED);
+    try {
+      throw new IOException("IGNORE");
+    } catch (IOException e) {
+      e.printStackTrace();
+    }
     this.assignmentManager = assignmentManager;
-    this.data = data;
     this.regionInfo = regionInfo;
     this.serverInfo = serverInfo;
     if(regionInfo.isRootRegion()) {

Modified: hbase/trunk/src/test/java/org/apache/hadoop/hbase/util/TestMergeTable.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/test/java/org/apache/hadoop/hbase/util/TestMergeTable.java?rev=1022003&r1=1022002&r2=1022003&view=diff
==============================================================================
--- hbase/trunk/src/test/java/org/apache/hadoop/hbase/util/TestMergeTable.java (original)
+++ hbase/trunk/src/test/java/org/apache/hadoop/hbase/util/TestMergeTable.java Wed Oct 13
05:39:11 2010
@@ -74,6 +74,8 @@ public class TestMergeTable {
 
     // Set maximum regionsize down.
     UTIL.getConfiguration().setLong("hbase.hregion.max.filesize", 64L * 1024L * 1024L);
+    // Make it so we don't compact and then split.
+    UTIL.getConfiguration().setInt("hbase.hstore.compactionThreshold", 30);
     // Startup hdfs.  Its in here we'll be putting our manually made regions.
     UTIL.startMiniDFSCluster(1);
     // Create hdfs hbase rootdir.



Mime
View raw message