@Override public void moveServersAndTables(Set<Address> servers, Set<TableName> tables, String targetGroup) throws IOException { wrapped.moveServersAndTables(servers, tables, targetGroup); verify(); }
@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(); } }
protected static void initialize() throws Exception { admin = TEST_UTIL.getAdmin(); cluster = TEST_UTIL.getHBaseCluster(); master = TEST_UTIL.getMiniHBaseCluster().getMaster(); //wait for balancer to come online TEST_UTIL.waitFor(WAIT_TIMEOUT, new Waiter.Predicate<Exception>() { @Override public boolean evaluate() throws Exception { return master.isInitialized() && ((RSGroupBasedLoadBalancer) master.getLoadBalancer()).isOnline(); } }); admin.balancerSwitch(false, true); rsGroupAdmin = new VerifyingRSGroupAdminClient( new RSGroupAdminClient(TEST_UTIL.getConnection()), TEST_UTIL.getConfiguration()); MasterCoprocessorHost host = master.getMasterCoprocessorHost(); observer = (CPMasterObserver) host.findCoprocessor(CPMasterObserver.class.getName()); rsGroupAdminEndpoint = (RSGroupAdminEndpoint) host.findCoprocessor(RSGroupAdminEndpoint.class.getName()); }
@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(); } }
@Override public void addRSGroup(String groupName) throws IOException { wrapped.addRSGroup(groupName); verify(); }
private static void initialize() throws Exception { admin = TEST_UTIL.getAdmin(); cluster = TEST_UTIL.getHBaseCluster(); master = ((MiniHBaseCluster)cluster).getMaster(); //wait for balancer to come online TEST_UTIL.waitFor(WAIT_TIMEOUT, new Waiter.Predicate<Exception>() { @Override public boolean evaluate() throws Exception { return master.isInitialized() && ((RSGroupBasedLoadBalancer) master.getLoadBalancer()).isOnline(); } }); admin.setBalancerRunning(false,true); rsGroupAdmin = new VerifyingRSGroupAdminClient( new RSGroupAdminClient(TEST_UTIL.getConnection()), TEST_UTIL.getConfiguration()); MasterCoprocessorHost host = master.getMasterCoprocessorHost(); observer = (CPMasterObserver) host.findCoprocessor(CPMasterObserver.class.getName()); rsGroupAdminEndpoint = (RSGroupAdminEndpoint) host.findCoprocessor(RSGroupAdminEndpoint.class.getName()); }
@Override public void moveServers(Set<Address> servers, String targetGroup) throws IOException { wrapped.moveServers(servers, targetGroup); verify(); }
@Override public void moveTables(Set<TableName> tables, String targetGroup) throws IOException { wrapped.moveTables(tables, targetGroup); verify(); }
@Override public void removeRSGroup(String name) throws IOException { wrapped.removeRSGroup(name); verify(); }
@Override public void removeServers(Set<Address> servers) throws IOException { wrapped.removeServers(servers); verify(); }
@Override public void moveServers(Set<Address> servers, String targetGroup) throws IOException { wrapped.moveServers(servers, targetGroup); verify(); }
@Override public void moveServersAndTables(Set<Address> servers, Set<TableName> tables, String targetGroup) throws IOException { wrapped.moveServersAndTables(servers, tables, targetGroup); verify(); }
@Override public void addRSGroup(String groupName) throws IOException { wrapped.addRSGroup(groupName); verify(); }
@Override public void moveTables(Set<TableName> tables, String targetGroup) throws IOException { wrapped.moveTables(tables, targetGroup); verify(); }
@Override public void removeRSGroup(String name) throws IOException { wrapped.removeRSGroup(name); verify(); }
@Override public void removeServers(Set<Address> servers) throws IOException { wrapped.removeServers(servers); verify(); }