@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 setup() throws Exception { conn = TEST_UTIL.getConnection(); admin = TEST_UTIL.getAdmin(); helper = new SpaceQuotaHelperForTests(TEST_UTIL, testName, COUNTER); helper.removeAllQuotas(conn); fs = TEST_UTIL.getTestFileSystem(); conf = TEST_UTIL.getConfiguration(); }
@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 setup() throws Exception { conn = TEST_UTIL.getConnection(); admin = TEST_UTIL.getAdmin(); helper = new SpaceQuotaHelperForTests(TEST_UTIL, testName, COUNTER); master = TEST_UTIL.getHBaseCluster().getMaster(); helper.removeAllQuotas(conn); testChore = new SnapshotQuotaObserverChore( TEST_UTIL.getConnection(), TEST_UTIL.getConfiguration(), master.getFileSystem(), master, null); }
@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 setup() throws Exception { conn = TEST_UTIL.getConnection(); admin = TEST_UTIL.getAdmin(); helper = new SpaceQuotaHelperForTests(TEST_UTIL, testName, COUNTER); master = TEST_UTIL.getHBaseCluster().getMaster(); helper.removeAllQuotas(conn); testChore = new SnapshotQuotaObserverChore( TEST_UTIL.getConnection(), TEST_UTIL.getConfiguration(), master.getFileSystem(), master, null); }
@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(); }