@Before public void beforeMethod() throws Exception { if(!initialized) { LOG.info("Setting up IntegrationTestRSGroup"); LOG.info("Initializing cluster with " + NUM_SLAVES_BASE + " servers"); TEST_UTIL = new IntegrationTestingUtility(); TEST_UTIL.getConfiguration().set(HConstants.HBASE_MASTER_LOADBALANCER_CLASS, RSGroupBasedLoadBalancer.class.getName()); TEST_UTIL.getConfiguration().set(CoprocessorHost.MASTER_COPROCESSOR_CONF_KEY, RSGroupAdminEndpoint.class.getName()); ((IntegrationTestingUtility)TEST_UTIL).initializeCluster(NUM_SLAVES_BASE); //set shared configs admin = TEST_UTIL.getAdmin(); cluster = TEST_UTIL.getHBaseClusterInterface(); rsGroupAdmin = new VerifyingRSGroupAdminClient(new RSGroupAdminClient(TEST_UTIL.getConnection()), TEST_UTIL.getConfiguration()); LOG.info("Done initializing cluster"); initialized = true; //cluster may not be clean //cleanup when initializing afterMethod(); } }
LOG.info("Cleaning up previous test run"); deleteTableIfNecessary(); deleteNamespaceIfNecessary(); deleteGroups(); admin.setBalancerRunning(true, true);
LOG.info("Cleaning up previous test run"); deleteTableIfNecessary(); deleteNamespaceIfNecessary(); deleteGroups(); admin.setBalancerRunning(true, true);
@Before public void beforeMethod() throws Exception { if(!initialized) { LOG.info("Setting up IntegrationTestRSGroup"); LOG.info("Initializing cluster with " + NUM_SLAVES_BASE + " servers"); TEST_UTIL = new IntegrationTestingUtility(); TEST_UTIL.getConfiguration().set(HConstants.HBASE_MASTER_LOADBALANCER_CLASS, RSGroupBasedLoadBalancer.class.getName()); TEST_UTIL.getConfiguration().set(CoprocessorHost.MASTER_COPROCESSOR_CONF_KEY, RSGroupAdminEndpoint.class.getName()); ((IntegrationTestingUtility)TEST_UTIL).initializeCluster(NUM_SLAVES_BASE); //set shared configs admin = TEST_UTIL.getAdmin(); cluster = TEST_UTIL.getHBaseClusterInterface(); rsGroupAdmin = new VerifyingRSGroupAdminClient(new RSGroupAdminClient(TEST_UTIL.getConnection()), TEST_UTIL.getConfiguration()); LOG.info("Done initializing cluster"); initialized = true; //cluster may not be clean //cleanup when initializing afterMethod(); } }