Search in sources :

Example 1 with StandaloneSubmittedJobGraphStore

use of org.apache.flink.runtime.jobmanager.StandaloneSubmittedJobGraphStore in project flink by apache.

the class JobManagerLeaderElectionTest method createJobManagerProps.

private Props createJobManagerProps(Configuration configuration) throws Exception {
    LeaderElectionService leaderElectionService;
    if (HighAvailabilityMode.fromConfig(configuration) == HighAvailabilityMode.NONE) {
        leaderElectionService = new StandaloneLeaderElectionService();
    } else {
        CuratorFramework client = ZooKeeperUtils.startCuratorFramework(configuration);
        leaderElectionService = ZooKeeperUtils.createLeaderElectionService(client, configuration);
    }
    // We don't need recovery in this test
    SubmittedJobGraphStore submittedJobGraphStore = new StandaloneSubmittedJobGraphStore();
    CheckpointRecoveryFactory checkpointRecoveryFactory = new StandaloneCheckpointRecoveryFactory();
    return Props.create(TestingJobManager.class, configuration, TestingUtils.defaultExecutor(), TestingUtils.defaultExecutor(), new InstanceManager(), new Scheduler(TestingUtils.defaultExecutionContext()), new BlobLibraryCacheManager(new BlobServer(configuration), 10L), ActorRef.noSender(), new NoRestartStrategy.NoRestartStrategyFactory(), AkkaUtils.getDefaultTimeoutAsFiniteDuration(), leaderElectionService, submittedJobGraphStore, checkpointRecoveryFactory, AkkaUtils.getDefaultTimeoutAsFiniteDuration(), Option.apply(null));
}
Also used : StandaloneSubmittedJobGraphStore(org.apache.flink.runtime.jobmanager.StandaloneSubmittedJobGraphStore) SubmittedJobGraphStore(org.apache.flink.runtime.jobmanager.SubmittedJobGraphStore) BlobLibraryCacheManager(org.apache.flink.runtime.execution.librarycache.BlobLibraryCacheManager) StandaloneCheckpointRecoveryFactory(org.apache.flink.runtime.checkpoint.StandaloneCheckpointRecoveryFactory) InstanceManager(org.apache.flink.runtime.instance.InstanceManager) Scheduler(org.apache.flink.runtime.jobmanager.scheduler.Scheduler) StandaloneSubmittedJobGraphStore(org.apache.flink.runtime.jobmanager.StandaloneSubmittedJobGraphStore) CheckpointRecoveryFactory(org.apache.flink.runtime.checkpoint.CheckpointRecoveryFactory) StandaloneCheckpointRecoveryFactory(org.apache.flink.runtime.checkpoint.StandaloneCheckpointRecoveryFactory) NoRestartStrategy(org.apache.flink.runtime.executiongraph.restart.NoRestartStrategy) CuratorFramework(org.apache.curator.framework.CuratorFramework) BlobServer(org.apache.flink.runtime.blob.BlobServer)

Aggregations

CuratorFramework (org.apache.curator.framework.CuratorFramework)1 BlobServer (org.apache.flink.runtime.blob.BlobServer)1 CheckpointRecoveryFactory (org.apache.flink.runtime.checkpoint.CheckpointRecoveryFactory)1 StandaloneCheckpointRecoveryFactory (org.apache.flink.runtime.checkpoint.StandaloneCheckpointRecoveryFactory)1 BlobLibraryCacheManager (org.apache.flink.runtime.execution.librarycache.BlobLibraryCacheManager)1 NoRestartStrategy (org.apache.flink.runtime.executiongraph.restart.NoRestartStrategy)1 InstanceManager (org.apache.flink.runtime.instance.InstanceManager)1 StandaloneSubmittedJobGraphStore (org.apache.flink.runtime.jobmanager.StandaloneSubmittedJobGraphStore)1 SubmittedJobGraphStore (org.apache.flink.runtime.jobmanager.SubmittedJobGraphStore)1 Scheduler (org.apache.flink.runtime.jobmanager.scheduler.Scheduler)1