HBASE-3088 TestAvroServer and TestThriftServer broken because use same table in all tests and tests enable/disable/delete
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1005552 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a6afa7b49f
commit
58423039df
|
@ -29,7 +29,10 @@ import org.apache.hadoop.hbase.Server;
|
|||
import org.apache.hadoop.hbase.catalog.MetaEditor;
|
||||
import org.apache.hadoop.hbase.master.AssignmentManager;
|
||||
import org.apache.hadoop.hbase.master.MasterServices;
|
||||
import org.apache.hadoop.hbase.util.Bytes;
|
||||
import org.apache.hadoop.hbase.util.Threads;
|
||||
import org.apache.hadoop.hbase.zookeeper.ZKTableDisable;
|
||||
import org.apache.zookeeper.KeeperException;
|
||||
|
||||
public class DeleteTableHandler extends TableEventHandler {
|
||||
private static final Log LOG = LogFactory.getLog(DeleteTableHandler.class);
|
||||
|
@ -67,5 +70,9 @@ public class DeleteTableHandler extends TableEventHandler {
|
|||
}
|
||||
// Delete table from FS
|
||||
this.masterServices.getMasterFileSystem().deleteTable(tableName);
|
||||
|
||||
// If entry for this table in zk, and up in AssignmentManager, remove it.
|
||||
// Call to undisableTable does this. TODO: Make a more formal purge table.
|
||||
am.undisableTable(Bytes.toString(tableName));
|
||||
}
|
||||
}
|
|
@ -152,7 +152,7 @@ public class TestAvroServer {
|
|||
GenericArray<AFamilyDescriptor> families = new GenericData.Array<AFamilyDescriptor>(1, familyArraySchema);
|
||||
families.add(familyA);
|
||||
tableA.families = families;
|
||||
impl.createTable(tableA);
|
||||
impl.createTable(tableA);
|
||||
assertEquals(impl.describeTable(tableAname).families.size(), 1);
|
||||
|
||||
impl.disableTable(tableAname);
|
||||
|
|
Loading…
Reference in New Issue