@Before public void removeAllQuotas() throws Exception { helper = new SpaceQuotaHelperForTests(TEST_UTIL, testName, COUNTER); conn = TEST_UTIL.getConnection(); admin = TEST_UTIL.getAdmin(); helper.waitForQuotaTable(conn); }
@Before public void removeAllQuotas() throws Exception { if (helper == null) { helper = new SpaceQuotaHelperForTests(TEST_UTIL, testName, new AtomicLong()); } final Connection conn = TEST_UTIL.getConnection(); // Wait for the quota table to be created if (!conn.getAdmin().tableExists(QuotaUtil.QUOTA_TABLE_NAME)) { helper.waitForQuotaTable(conn); } else { // Or, clean up any quotas from previous test runs. helper.removeAllQuotas(conn); assertEquals(0, helper.listNumDefinedQuotas(conn)); } }
waitForQuotaTable(conn); } else {
@Before public void removeAllQuotas() throws Exception { final Connection conn = TEST_UTIL.getConnection(); if (helper == null) { helper = new SpaceQuotaHelperForTests(TEST_UTIL, testName, COUNTER); } // Wait for the quota table to be created if (!conn.getAdmin().tableExists(QuotaUtil.QUOTA_TABLE_NAME)) { helper.waitForQuotaTable(conn); } else { // Or, clean up any quotas from previous test runs. helper.removeAllQuotas(conn); assertEquals(0, helper.listNumDefinedQuotas(conn)); } }
@Before public void removeAllQuotas() throws Exception { final Connection conn = TEST_UTIL.getConnection(); if (helper == null) { helper = new SpaceQuotaHelperForTests(TEST_UTIL, testName, COUNTER); } // Wait for the quota table to be created if (!conn.getAdmin().tableExists(QuotaUtil.QUOTA_TABLE_NAME)) { helper.waitForQuotaTable(conn); } else { // Or, clean up any quotas from previous test runs. helper.removeAllQuotas(conn); assertEquals(0, helper.listNumDefinedQuotas(conn)); } }
@Before public void removeAllQuotas() throws Exception { final Connection conn = TEST_UTIL.getConnection(); if (helper == null) { helper = new SpaceQuotaHelperForTests(TEST_UTIL, testName, COUNTER); } // Wait for the quota table to be created if (!conn.getAdmin().tableExists(QuotaUtil.QUOTA_TABLE_NAME)) { helper.waitForQuotaTable(conn); } else { // Or, clean up any quotas from previous test runs. helper.removeAllQuotas(conn); assertEquals(0, helper.listNumDefinedQuotas(conn)); } master = TEST_UTIL.getMiniHBaseCluster().getMaster(); snapshotNotifier = (SpaceQuotaSnapshotNotifierForTest) master.getSpaceQuotaSnapshotNotifier(); assertNotNull(snapshotNotifier); snapshotNotifier.clearSnapshots(); chore = master.getQuotaObserverChore(); }
@Before public void removeAllQuotas() throws Exception { if (helper == null) { helper = new SpaceQuotaHelperForTests(TEST_UTIL, testName, new AtomicLong()); } final Connection conn = TEST_UTIL.getConnection(); // Wait for the quota table to be created if (!conn.getAdmin().tableExists(QuotaUtil.QUOTA_TABLE_NAME)) { helper.waitForQuotaTable(conn); } else { // Or, clean up any quotas from previous test runs. helper.removeAllQuotas(conn); assertEquals(0, helper.listNumDefinedQuotas(conn)); } }
@Before public void removeAllQuotas() throws Exception { final Connection conn = TEST_UTIL.getConnection(); if (helper == null) { helper = new SpaceQuotaHelperForTests(TEST_UTIL, testName, COUNTER); } // Wait for the quota table to be created if (!conn.getAdmin().tableExists(QuotaUtil.QUOTA_TABLE_NAME)) { helper.waitForQuotaTable(conn); } else { // Or, clean up any quotas from previous test runs. helper.removeAllQuotas(conn); assertEquals(0, helper.listNumDefinedQuotas(conn)); } }
@Before public void removeAllQuotas() throws Exception { final Connection conn = TEST_UTIL.getConnection(); if (helper == null) { helper = new SpaceQuotaHelperForTests(TEST_UTIL, testName, COUNTER); } // Wait for the quota table to be created if (!conn.getAdmin().tableExists(QuotaUtil.QUOTA_TABLE_NAME)) { helper.waitForQuotaTable(conn); } else { // Or, clean up any quotas from previous test runs. helper.removeAllQuotas(conn); assertEquals(0, helper.listNumDefinedQuotas(conn)); } }
@Before public void removeAllQuotas() throws Exception { final Connection conn = TEST_UTIL.getConnection(); if (helper == null) { helper = new SpaceQuotaHelperForTests(TEST_UTIL, testName, COUNTER); } // Wait for the quota table to be created if (!conn.getAdmin().tableExists(QuotaUtil.QUOTA_TABLE_NAME)) { helper.waitForQuotaTable(conn); } else { // Or, clean up any quotas from previous test runs. helper.removeAllQuotas(conn); assertEquals(0, helper.listNumDefinedQuotas(conn)); } master = TEST_UTIL.getMiniHBaseCluster().getMaster(); snapshotNotifier = (SpaceQuotaSnapshotNotifierForTest) master.getSpaceQuotaSnapshotNotifier(); assertNotNull(snapshotNotifier); snapshotNotifier.clearSnapshots(); chore = master.getQuotaObserverChore(); }