use of org.apache.flink.runtime.resourcemanager.utils.MockResourceManagerRuntimeServices in project flink by apache.
the class StandaloneResourceManagerTest method createResourceManager.
private TestingStandaloneResourceManager createResourceManager(Time startupPeriod, SlotManager slotManager) throws Exception {
final MockResourceManagerRuntimeServices rmServices = new MockResourceManagerRuntimeServices(RPC_SERVICE.getTestingRpcService(), TIMEOUT, slotManager);
final TestingStandaloneResourceManager rm = new TestingStandaloneResourceManager(rmServices.rpcService, UUID.randomUUID(), ResourceID.generate(), rmServices.heartbeatServices, rmServices.slotManager, rmServices.jobLeaderIdService, new ClusterInformation("localhost", 1234), fatalErrorHandler, UnregisteredMetricGroups.createUnregisteredResourceManagerMetricGroup(), startupPeriod);
rm.start();
rm.getStartedFuture().get(TIMEOUT.getSize(), TIMEOUT.getUnit());
return rm;
}
Aggregations