hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1125045 - in /hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver: CompactSplitThread.java SplitTransaction.java
Date Thu, 19 May 2011 18:34:33 GMT
Author: stack
Date: Thu May 19 18:34:32 2011
New Revision: 1125045

URL: http://svn.apache.org/viewvc?rev=1125045&view=rev
Log:
HBASE-3898  TestSplitTransactionOnCluster broke in TRUNK -- retry

Modified:
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/SplitTransaction.java

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java?rev=1125045&r1=1125044&r2=1125045&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
(original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplitThread.java
Thu May 19 18:34:32 2011
@@ -129,6 +129,11 @@ public class CompactSplitThread implemen
   }
 
   public synchronized void requestSplit(final HRegion r, byte[] midKey) {
+    if (midKey == null) {
+      LOG.debug("Region " + r.getRegionNameAsString() +
+        " not splittable because midkey=null");
+      return;
+    }
     try {
       this.splits.execute(new SplitRequest(r, midKey, this.server));
       if (LOG.isDebugEnabled()) {

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/SplitTransaction.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/SplitTransaction.java?rev=1125045&r1=1125044&r2=1125045&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/SplitTransaction.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/SplitTransaction.java Thu
May 19 18:34:32 2011
@@ -156,6 +156,8 @@ public class SplitTransaction {
    */
   public boolean prepare() {
     if (this.parent.isClosed() || this.parent.isClosing()) return false;
+    // Split key can be false if this region is unsplittable; i.e. has refs.
+    if (this.splitrow == null) return false;
     HRegionInfo hri = this.parent.getRegionInfo();
     parent.prepareToSplit();
     // Check splitrow.



Mime
View raw message