Search in sources :

Example 1 with StandaloneCheckpointRecoveryFactory

use of org.apache.flink.runtime.checkpoint.StandaloneCheckpointRecoveryFactory 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)

Example 2 with StandaloneCheckpointRecoveryFactory

use of org.apache.flink.runtime.checkpoint.StandaloneCheckpointRecoveryFactory in project flink by apache.

the class ExecutionVertexLocalityTest method createTestGraph.

// ------------------------------------------------------------------------
//  Utilities
// ------------------------------------------------------------------------
/**
	 * Creates a simple 2 vertex graph with a parallel source and a parallel target.
	 */
private ExecutionGraph createTestGraph(int parallelism, boolean allToAll) throws Exception {
    JobVertex source = new JobVertex("source", sourceVertexId);
    source.setParallelism(parallelism);
    source.setInvokableClass(NoOpInvokable.class);
    JobVertex target = new JobVertex("source", targetVertexId);
    target.setParallelism(parallelism);
    target.setInvokableClass(NoOpInvokable.class);
    DistributionPattern connectionPattern = allToAll ? DistributionPattern.ALL_TO_ALL : DistributionPattern.POINTWISE;
    target.connectNewDataSetAsInput(source, connectionPattern, ResultPartitionType.PIPELINED);
    JobGraph testJob = new JobGraph(jobId, "test job", source, target);
    return ExecutionGraphBuilder.buildGraph(null, testJob, new Configuration(), TestingUtils.defaultExecutor(), TestingUtils.defaultExecutor(), mock(SlotProvider.class), getClass().getClassLoader(), new StandaloneCheckpointRecoveryFactory(), Time.of(10, TimeUnit.SECONDS), new FixedDelayRestartStrategy(10, 0L), new UnregisteredMetricsGroup(), 1, log);
}
Also used : JobGraph(org.apache.flink.runtime.jobgraph.JobGraph) UnregisteredMetricsGroup(org.apache.flink.metrics.groups.UnregisteredMetricsGroup) JobVertex(org.apache.flink.runtime.jobgraph.JobVertex) SlotProvider(org.apache.flink.runtime.instance.SlotProvider) StandaloneCheckpointRecoveryFactory(org.apache.flink.runtime.checkpoint.StandaloneCheckpointRecoveryFactory) Configuration(org.apache.flink.configuration.Configuration) FixedDelayRestartStrategy(org.apache.flink.runtime.executiongraph.restart.FixedDelayRestartStrategy) DistributionPattern(org.apache.flink.runtime.jobgraph.DistributionPattern)

Example 3 with StandaloneCheckpointRecoveryFactory

use of org.apache.flink.runtime.checkpoint.StandaloneCheckpointRecoveryFactory in project flink by apache.

the class ExecutionGraphDeploymentTest method createExecutionGraph.

private ExecutionGraph createExecutionGraph(Configuration configuration) throws Exception {
    final ScheduledExecutorService executor = TestingUtils.defaultExecutor();
    final JobID jobId = new JobID();
    final JobGraph jobGraph = new JobGraph(jobId, "test");
    jobGraph.setSnapshotSettings(new JobSnapshottingSettings(Collections.<JobVertexID>emptyList(), Collections.<JobVertexID>emptyList(), Collections.<JobVertexID>emptyList(), 100, 10 * 60 * 1000, 0, 1, ExternalizedCheckpointSettings.none(), null, false));
    return ExecutionGraphBuilder.buildGraph(null, jobGraph, configuration, executor, executor, new ProgrammedSlotProvider(1), getClass().getClassLoader(), new StandaloneCheckpointRecoveryFactory(), Time.seconds(10), new NoRestartStrategy(), new UnregisteredMetricsGroup(), 1, LoggerFactory.getLogger(getClass()));
}
Also used : DirectScheduledExecutorService(org.apache.flink.runtime.testutils.DirectScheduledExecutorService) ScheduledExecutorService(java.util.concurrent.ScheduledExecutorService) JobGraph(org.apache.flink.runtime.jobgraph.JobGraph) UnregisteredMetricsGroup(org.apache.flink.metrics.groups.UnregisteredMetricsGroup) StandaloneCheckpointRecoveryFactory(org.apache.flink.runtime.checkpoint.StandaloneCheckpointRecoveryFactory) JobVertexID(org.apache.flink.runtime.jobgraph.JobVertexID) JobSnapshottingSettings(org.apache.flink.runtime.jobgraph.tasks.JobSnapshottingSettings) NoRestartStrategy(org.apache.flink.runtime.executiongraph.restart.NoRestartStrategy) JobID(org.apache.flink.api.common.JobID)

Aggregations

StandaloneCheckpointRecoveryFactory (org.apache.flink.runtime.checkpoint.StandaloneCheckpointRecoveryFactory)3 UnregisteredMetricsGroup (org.apache.flink.metrics.groups.UnregisteredMetricsGroup)2 NoRestartStrategy (org.apache.flink.runtime.executiongraph.restart.NoRestartStrategy)2 JobGraph (org.apache.flink.runtime.jobgraph.JobGraph)2 ScheduledExecutorService (java.util.concurrent.ScheduledExecutorService)1 CuratorFramework (org.apache.curator.framework.CuratorFramework)1 JobID (org.apache.flink.api.common.JobID)1 Configuration (org.apache.flink.configuration.Configuration)1 BlobServer (org.apache.flink.runtime.blob.BlobServer)1 CheckpointRecoveryFactory (org.apache.flink.runtime.checkpoint.CheckpointRecoveryFactory)1 BlobLibraryCacheManager (org.apache.flink.runtime.execution.librarycache.BlobLibraryCacheManager)1 FixedDelayRestartStrategy (org.apache.flink.runtime.executiongraph.restart.FixedDelayRestartStrategy)1 InstanceManager (org.apache.flink.runtime.instance.InstanceManager)1 SlotProvider (org.apache.flink.runtime.instance.SlotProvider)1 DistributionPattern (org.apache.flink.runtime.jobgraph.DistributionPattern)1 JobVertex (org.apache.flink.runtime.jobgraph.JobVertex)1 JobVertexID (org.apache.flink.runtime.jobgraph.JobVertexID)1 JobSnapshottingSettings (org.apache.flink.runtime.jobgraph.tasks.JobSnapshottingSettings)1 StandaloneSubmittedJobGraphStore (org.apache.flink.runtime.jobmanager.StandaloneSubmittedJobGraphStore)1 SubmittedJobGraphStore (org.apache.flink.runtime.jobmanager.SubmittedJobGraphStore)1