use of org.apache.hadoop.hbase.master.assignment.MockMasterServices in project hbase by apache.
the class TestCatalogJanitor method setup.
@Before
public void setup() throws IOException, KeeperException {
setRootDirAndCleanIt(HTU, this.name.getMethodName());
NavigableMap<ServerName, SortedSet<byte[]>> regionsToRegionServers = new ConcurrentSkipListMap<ServerName, SortedSet<byte[]>>();
this.masterServices = new MockMasterServices(HTU.getConfiguration(), regionsToRegionServers);
this.masterServices.start(10, null);
this.janitor = new CatalogJanitor(masterServices);
}
use of org.apache.hadoop.hbase.master.assignment.MockMasterServices in project hbase by apache.
the class TestServerRemoteProcedure method setUp.
@Before
public void setUp() throws Exception {
util = new HBaseTestingUtil();
this.executor = Executors.newSingleThreadScheduledExecutor(new ThreadFactoryBuilder().setUncaughtExceptionHandler((t, e) -> LOG.warn("Uncaught: ", e)).build());
master = new MockMasterServices(util.getConfiguration(), this.regionsToRegionServers);
rsDispatcher = new MockRSProcedureDispatcher(master);
rsDispatcher.setMockRsExecutor(new NoopRSExecutor());
master.start(2, rsDispatcher);
am = master.getAssignmentManager();
master.getServerManager().getOnlineServersList().stream().forEach(serverName -> am.getRegionStates().getOrCreateServer(serverName));
}
use of org.apache.hadoop.hbase.master.assignment.MockMasterServices in project hbase by apache.
the class TestCoreMasterCoprocessor method before.
@Before
public void before() throws IOException {
String methodName = this.name.getMethodName();
this.ms = new MockMasterServices(HTU.getConfiguration(), null);
this.mch = new MasterCoprocessorHost(this.ms, HTU.getConfiguration());
this.mch.preMasterInitialization();
}
Aggregations