Search in sources :

Example 1 with MockResourceManagerRuntimeServices

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;
}
Also used : MockResourceManagerRuntimeServices(org.apache.flink.runtime.resourcemanager.utils.MockResourceManagerRuntimeServices) ClusterInformation(org.apache.flink.runtime.entrypoint.ClusterInformation)

Aggregations

ClusterInformation (org.apache.flink.runtime.entrypoint.ClusterInformation)1 MockResourceManagerRuntimeServices (org.apache.flink.runtime.resourcemanager.utils.MockResourceManagerRuntimeServices)1