Author: stack
Date: Tue Oct 5 16:25:01 2010
New Revision: 1004699
URL: http://svn.apache.org/viewvc?rev=1004699&view=rev
Log:
Only assign if table is enabled -- fixes TestHFileOutputFormat
Modified:
hbase/trunk/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
Modified:
hbase/trunk/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
URL:
http://svn.apache.org/viewvc/hbase/trunk/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java?rev=1004699&r1=1004698&r2=1004699&view=diff
==============================================================================
--- hbase/trunk/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
(original)
+++ hbase/trunk/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
Tue Oct 5 16:25:01 2010
@@ -70,6 +70,7 @@ import org.apache.hadoop.mapred.MiniMRCl
import org.apache.hadoop.security.UnixUserGroupInformation;
import org.apache.hadoop.security.UserGroupInformation;
import org.apache.zookeeper.ZooKeeper;
+import org.eclipse.jdt.core.dom.ThisExpression;
import com.google.common.base.Preconditions;
@@ -674,9 +675,11 @@ public class HBaseTestingUtility {
// flush cache of regions
HConnection conn = table.getConnection();
conn.clearRegionCache();
- // assign all the new regions
- for(HRegionInfo hri : newRegions) {
- hbaseCluster.getMaster().assignRegion(hri);
+ // assign all the new regions IF table is enabled.
+ if (getHBaseAdmin().isTableEnabled(table.getTableName())) {
+ for(HRegionInfo hri : newRegions) {
+ hbaseCluster.getMaster().assignRegion(hri);
+ }
}
return count;
}