Index: src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransactionOnCluster.java =================================================================== --- src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransactionOnCluster.java (revision 1124532) +++ src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransactionOnCluster.java (working copy) @@ -382,7 +382,11 @@ assertTrue(daughters.size() >= 2); // Now split one of the daughters. regionCount = server.getOnlineRegions().size(); - split(daughters.get(0).getRegionInfo(), server, regionCount); + HRegionInfo daughter = daughters.get(0).getRegionInfo(); + // Compact first to ensure we have cleaned up references -- else the split + // will fail. + this.admin.compact(daughter.getRegionName()); + split(daughter, server, regionCount); // Get list of daughters daughters = cluster.getRegions(tableName); // Now crash the server Index: src/main/java/org/apache/hadoop/hbase/regionserver/SplitRequest.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/regionserver/SplitRequest.java (revision 1124532) +++ src/main/java/org/apache/hadoop/hbase/regionserver/SplitRequest.java (working copy) @@ -1,3 +1,22 @@ +/** + * Copyright 2011 The Apache Software Foundation + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.apache.hadoop.hbase.regionserver; import java.io.IOException; @@ -4,14 +23,8 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.hbase.HConstants; -import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.RemoteExceptionHandler; -import org.apache.hadoop.hbase.client.HTable; -import org.apache.hadoop.hbase.client.Put; import org.apache.hadoop.hbase.util.Bytes; -import org.apache.hadoop.hbase.util.Writables; import org.apache.hadoop.util.StringUtils; import com.google.common.base.Preconditions;