HBASE-21093 Increase the dispatch delay for testing DDL procedures
This commit is contained in:
parent
50055dbf04
commit
c01d4d3a35
|
@ -15,15 +15,17 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.apache.hadoop.hbase.master.procedure;
|
package org.apache.hadoop.hbase.master.procedure;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.hbase.HBaseTestingUtility;
|
import org.apache.hadoop.hbase.HBaseTestingUtility;
|
||||||
import org.apache.hadoop.hbase.HTableDescriptor;
|
import org.apache.hadoop.hbase.client.TableDescriptor;
|
||||||
import org.apache.hadoop.hbase.master.HMaster;
|
import org.apache.hadoop.hbase.master.HMaster;
|
||||||
import org.apache.hadoop.hbase.procedure2.ProcedureExecutor;
|
import org.apache.hadoop.hbase.procedure2.ProcedureExecutor;
|
||||||
import org.apache.hadoop.hbase.procedure2.ProcedureTestingUtility;
|
import org.apache.hadoop.hbase.procedure2.ProcedureTestingUtility;
|
||||||
|
import org.apache.hadoop.hbase.procedure2.RemoteProcedureDispatcher;
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
import org.junit.AfterClass;
|
import org.junit.AfterClass;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
|
@ -31,14 +33,14 @@ import org.junit.BeforeClass;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import static org.junit.Assert.assertTrue;
|
|
||||||
|
|
||||||
public abstract class TestTableDDLProcedureBase {
|
public abstract class TestTableDDLProcedureBase {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(TestTableDDLProcedureBase.class);
|
private static final Logger LOG = LoggerFactory.getLogger(TestTableDDLProcedureBase.class);
|
||||||
protected static final HBaseTestingUtility UTIL = new HBaseTestingUtility();
|
protected static final HBaseTestingUtility UTIL = new HBaseTestingUtility();
|
||||||
|
|
||||||
private static void setupConf(Configuration conf) {
|
private static void setupConf(Configuration conf) {
|
||||||
conf.setInt(MasterProcedureConstants.MASTER_PROCEDURE_THREADS, 1);
|
conf.setInt(MasterProcedureConstants.MASTER_PROCEDURE_THREADS, 1);
|
||||||
|
// increase the dispatch delay so we can do more batching
|
||||||
|
conf.setInt(RemoteProcedureDispatcher.DISPATCH_DELAY_CONF_KEY, 2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
|
@ -64,7 +66,7 @@ public abstract class TestTableDDLProcedureBase {
|
||||||
@After
|
@After
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
resetProcExecutorTestingKillFlag();
|
resetProcExecutorTestingKillFlag();
|
||||||
for (HTableDescriptor htd: UTIL.getAdmin().listTables()) {
|
for (TableDescriptor htd : UTIL.getAdmin().listTableDescriptors()) {
|
||||||
LOG.info("Tear down, remove table=" + htd.getTableName());
|
LOG.info("Tear down, remove table=" + htd.getTableName());
|
||||||
UTIL.deleteTable(htd.getTableName());
|
UTIL.deleteTable(htd.getTableName());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue