/** * Wait until all regions in a table have been assigned. Waits default timeout before giving up * (30 seconds). * @param table Table to wait on. * @throws InterruptedException * @throws IOException */ public void waitTableAvailable(TableName table) throws InterruptedException, IOException { waitTableAvailable(table.getName(), 30000); }
@Before public void setUpBeforeTest() throws IOException, InterruptedException { TEST_UTIL.createTable(TABLE_NAME, FAMILY, SPLIT_KEYS); TEST_UTIL.waitTableAvailable(TABLE_NAME); }
@Before public void setUp() throws IOException, InterruptedException { tableName = TableName.valueOf(testName.getMethodName().replaceAll("[^0-9a-zA-Z]", "_")); UTIL.createTable(tableName, CF); UTIL.waitTableAvailable(tableName); }
@Before public void setup() throws Exception { TEST_UTIL.getConfiguration().setInt("hbase.regionserver.logroll.period", logRollPeriod); TEST_UTIL.startMiniCluster(1); TableName name = TableName.valueOf("Test"); TEST_UTIL.createTable(name, Bytes.toBytes("cf")); TEST_UTIL.waitTableAvailable(name); }
@Before public void setUp() throws IOException, InterruptedException { tableName = TableName.valueOf(name.getMethodName()); UTIL.createTable(tableName, CF); UTIL.waitTableAvailable(tableName); }
@BeforeClass public static void setUpBeforeClass() throws Exception { TEST_UTIL.getConfiguration().setBoolean(QuotaUtil.QUOTA_CONF_KEY, true); TEST_UTIL.getConfiguration().setInt(QuotaCache.REFRESH_CONF_KEY, 2000); TEST_UTIL.getConfiguration().setInt("hbase.hstore.compactionThreshold", 10); TEST_UTIL.getConfiguration().setInt("hbase.regionserver.msginterval", 100); TEST_UTIL.getConfiguration().setInt("hbase.client.pause", 250); TEST_UTIL.getConfiguration().setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 6); TEST_UTIL.getConfiguration().setBoolean("hbase.master.enabletable.roundrobin", true); TEST_UTIL.startMiniCluster(1); TEST_UTIL.waitTableAvailable(QuotaTableUtil.QUOTA_TABLE_NAME); }
@BeforeClass public static void setUpBeforeClass() throws Exception { TEST_UTIL.getConfiguration().setBoolean(QuotaUtil.QUOTA_CONF_KEY, true); TEST_UTIL.getConfiguration().setInt(QuotaCache.REFRESH_CONF_KEY, 2000); TEST_UTIL.getConfiguration().setInt("hbase.hstore.compactionThreshold", 10); TEST_UTIL.getConfiguration().setInt("hbase.regionserver.msginterval", 100); TEST_UTIL.getConfiguration().setInt("hbase.client.pause", 250); TEST_UTIL.getConfiguration().setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 6); TEST_UTIL.getConfiguration().setBoolean("hbase.master.enabletable.roundrobin", true); TEST_UTIL.startMiniCluster(1); TEST_UTIL.waitTableAvailable(QuotaTableUtil.QUOTA_TABLE_NAME); }
@BeforeClass public static void setUpBeforeClass() throws Exception { TEST_UTIL.getConfiguration().setBoolean(QuotaUtil.QUOTA_CONF_KEY, true); TEST_UTIL.getConfiguration().setInt(QuotaCache.REFRESH_CONF_KEY, 2000); TEST_UTIL.getConfiguration().setInt(HConstants.HBASE_RPC_TIMEOUT_KEY, 60000); TEST_UTIL.getConfiguration().setInt(HConstants.HBASE_CLIENT_OPERATION_TIMEOUT, 120000); TEST_UTIL.getConfiguration().setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 2); TEST_UTIL.getConfiguration().setInt(START_LOG_ERRORS_AFTER_COUNT_KEY, 0); TEST_UTIL.startMiniCluster(1); TEST_UTIL.waitTableAvailable(QuotaTableUtil.QUOTA_TABLE_NAME); ASYNC_CONN = ConnectionFactory.createAsyncConnection(TEST_UTIL.getConfiguration()).get(); }
@BeforeClass public static void setupCluster() throws Exception { UTIL.getConfiguration().set(CoprocessorHost.MASTER_COPROCESSOR_CONF_KEY, MergeRegionObserver.class.getName()); UTIL.startMiniCluster(3); admin = UTIL.getHBaseAdmin(); byte[][] splitKeys = new byte[1][]; splitKeys[0] = SPLITKEY; UTIL.createTable(TABLE_NAME, CF, splitKeys); UTIL.waitTableAvailable(TABLE_NAME); }
@BeforeClass public static void setUp() throws Exception { UTIL.startMiniCluster(3); UTIL.createMultiRegionTable(NAME, CF); UTIL.waitTableAvailable(NAME); }
@BeforeClass public static void setUp() throws Exception { UTIL.getConfiguration().setStrings(CoprocessorHost.REGION_COPROCESSOR_CONF_KEY, DelayCloseCP.class.getName()); UTIL.startMiniCluster(3); UTIL.getAdmin().balancerSwitch(false, true); UTIL.createTable(TABLE_NAME, CF); UTIL.waitTableAvailable(TABLE_NAME); }
@Test public void testIsTableAvailable() throws Exception { createTableWithDefaultConf(tableName); TEST_UTIL.waitTableAvailable(tableName); assertTrue(admin.isTableAvailable(tableName).get()); assertTrue(admin.isTableAvailable(TableName.META_TABLE_NAME).get()); } }
@BeforeClass public static void setUpBeforeClass() throws Exception { TEST_UTIL.startMiniCluster(1); TEST_UTIL.createTable(TABLE_NAME, FAMILY); TEST_UTIL.waitTableAvailable(TABLE_NAME); ASYNC_CONN = ConnectionFactory.createAsyncConnection(TEST_UTIL.getConfiguration()).get(); }
@BeforeClass public static void setupCluster() throws Exception { UTIL.startMiniCluster(1); admin = UTIL.getHBaseAdmin(); TABLE = UTIL.createTable(TABLE_NAME, CF); UTIL.waitTableAvailable(TABLE_NAME); }
@BeforeClass public static void setupCluster() throws Exception { UTIL.startMiniCluster(1); admin = UTIL.getHBaseAdmin(); byte[][] splitKeys = new byte[1][]; splitKeys[0] = SPLITKEY; TABLE = UTIL.createTable(TABLE_NAME, CF, splitKeys); UTIL.waitTableAvailable(TABLE_NAME); }
@BeforeClass public static void setUp() throws Exception { UTIL.getConfiguration().setClass(HConstants.MASTER_IMPL, HMasterForTest.class, HMaster.class); UTIL.startMiniCluster(1); UTIL.createTable(NAME, CF); UTIL.waitTableAvailable(NAME); }
@BeforeClass public static void setUp() throws Exception { UTIL.startMiniCluster(3); UTIL.getAdmin().balancerSwitch(false, true); UTIL.createTable(TABLE_NAME, CF); UTIL.waitTableAvailable(TABLE_NAME); }
@Before public void setUp() throws Exception { testUtil.getConfiguration().setInt("hbase.regionserver.msginterval", 30000); testUtil.startMiniCluster(2); Admin admin = testUtil.getAdmin(); admin.createNamespace(namespace); admin.createTable(TableDescriptorBuilder.newBuilder(tableName) .setColumnFamily(ColumnFamilyDescriptorBuilder.of(family)).build()); testUtil.waitTableAvailable(tableName); }
@BeforeClass public static void setUp() throws Exception { UTIL.startMiniCluster(1); UTIL.getAdmin().balancerSwitch(false, true); UTIL.createTable(TableDescriptorBuilder.newBuilder(TABLE_NAME) .setColumnFamily(ColumnFamilyDescriptorBuilder.of("cf")) .setRegionReplication(REGION_REPLICATION).build(), new byte[][] { Bytes.toBytes(0) }); UTIL.waitTableAvailable(TABLE_NAME); HMaster master = UTIL.getMiniHBaseCluster().getMaster(); ENV = master.getMasterProcedureExecutor().getEnvironment(); AM = master.getAssignmentManager(); }
@BeforeClass public static void setUp() throws Exception { UTIL.getConfiguration().setClass(HConstants.MASTER_IMPL, HMasterForTest.class, HMaster.class); UTIL .startMiniCluster(StartMiniClusterOption.builder().numMasters(2).numRegionServers(2).build()); UTIL.createTable(NAME, CF); UTIL.waitTableAvailable(NAME); UTIL.getAdmin().balancerSwitch(false, true); }