/** * Returns the specified restart strategy configuration. * * @return The restart strategy configuration to be used */ @PublicEvolving public RestartStrategies.RestartStrategyConfiguration getRestartStrategy() { return config.getRestartStrategy(); }
/** * Returns the specified restart strategy configuration. * * @return The restart strategy configuration to be used */ @PublicEvolving public RestartStrategies.RestartStrategyConfiguration getRestartStrategy() { return config.getRestartStrategy(); }
public ArchivedExecutionConfig(ExecutionConfig ec) { executionMode = ec.getExecutionMode().name(); if (ec.getRestartStrategy() != null) { restartStrategyDescription = ec.getRestartStrategy().getDescription(); } else { restartStrategyDescription = "default"; } parallelism = ec.getParallelism(); objectReuseEnabled = ec.isObjectReuseEnabled(); if (ec.getGlobalJobParameters() != null && ec.getGlobalJobParameters().toMap() != null) { globalJobParameters = ec.getGlobalJobParameters().toMap(); } else { globalJobParameters = Collections.emptyMap(); } }
/** * Tests that in a streaming use case where checkpointing is enabled, there is no default strategy set on the * client side. */ @Test public void testFallbackStrategyOnClientSideWhenCheckpointingEnabled() throws Exception { StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(); env.enableCheckpointing(500); env.fromElements(1).print(); StreamGraph graph = env.getStreamGraph(); JobGraph jobGraph = graph.getJobGraph(); RestartStrategies.RestartStrategyConfiguration restartStrategy = jobGraph.getSerializedExecutionConfig().deserializeValue(getClass().getClassLoader()).getRestartStrategy(); Assert.assertNotNull(restartStrategy); Assert.assertTrue(restartStrategy instanceof RestartStrategies.FallbackRestartStrategyConfiguration); }
/** * Checks that in a streaming use case where checkpointing is enabled and the number * of execution retries is set to 0, restarting is deactivated. */ @Test public void testNoRestartingWhenCheckpointingAndExplicitExecutionRetriesZero() throws Exception { StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(); env.enableCheckpointing(500); env.setNumberOfExecutionRetries(0); env.fromElements(1).print(); StreamGraph graph = env.getStreamGraph(); JobGraph jobGraph = graph.getJobGraph(); RestartStrategies.RestartStrategyConfiguration restartStrategy = jobGraph.getSerializedExecutionConfig().deserializeValue(getClass().getClassLoader()).getRestartStrategy(); Assert.assertNotNull(restartStrategy); Assert.assertTrue(restartStrategy instanceof RestartStrategies.NoRestartStrategyConfiguration); }
/** * Checks that in a streaming use case where checkpointing is enabled and the number * of execution retries is set to 42 and the delay to 1337, fixed delay restarting is used. */ @Test public void testFixedRestartingWhenCheckpointingAndExplicitExecutionRetriesNonZero() throws Exception { StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(); env.enableCheckpointing(500); env.setNumberOfExecutionRetries(42); env.getConfig().setExecutionRetryDelay(1337); env.fromElements(1).print(); StreamGraph graph = env.getStreamGraph(); JobGraph jobGraph = graph.getJobGraph(); RestartStrategies.RestartStrategyConfiguration restartStrategy = jobGraph.getSerializedExecutionConfig().deserializeValue(getClass().getClassLoader()).getRestartStrategy(); Assert.assertNotNull(restartStrategy); Assert.assertTrue(restartStrategy instanceof RestartStrategies.FixedDelayRestartStrategyConfiguration); Assert.assertEquals(42, ((RestartStrategies.FixedDelayRestartStrategyConfiguration) restartStrategy).getRestartAttempts()); Assert.assertEquals(1337, ((RestartStrategies.FixedDelayRestartStrategyConfiguration) restartStrategy).getDelayBetweenAttemptsInterval().toMilliseconds()); } }
/** * Returns the specified restart strategy configuration. * * @return The restart strategy configuration to be used */ @PublicEvolving public RestartStrategies.RestartStrategyConfiguration getRestartStrategy() { return config.getRestartStrategy(); }
/** * Returns the specified restart strategy configuration. * * @return The restart strategy configuration to be used */ @PublicEvolving public RestartStrategies.RestartStrategyConfiguration getRestartStrategy() { return config.getRestartStrategy(); }
/** * Returns the specified restart strategy configuration. * * @return The restart strategy configuration to be used */ @PublicEvolving public RestartStrategies.RestartStrategyConfiguration getRestartStrategy() { return config.getRestartStrategy(); }
/** * Returns the specified restart strategy configuration. * * @return The restart strategy configuration to be used */ @PublicEvolving public RestartStrategies.RestartStrategyConfiguration getRestartStrategy() { return config.getRestartStrategy(); }
/** * Returns the specified restart strategy configuration. * * @return The restart strategy configuration to be used */ @PublicEvolving public RestartStrategies.RestartStrategyConfiguration getRestartStrategy() { return config.getRestartStrategy(); }
/** * Returns the specified restart strategy configuration. * * @return The restart strategy configuration to be used */ @PublicEvolving public RestartStrategies.RestartStrategyConfiguration getRestartStrategy() { return config.getRestartStrategy(); }
/** * Returns the specified restart strategy configuration. * * @return The restart strategy configuration to be used */ @PublicEvolving public RestartStrategies.RestartStrategyConfiguration getRestartStrategy() { return config.getRestartStrategy(); }
public ArchivedExecutionConfig(ExecutionConfig ec) { executionMode = ec.getExecutionMode().name(); if (ec.getRestartStrategy() != null) { restartStrategyDescription = ec.getRestartStrategy().getDescription(); } else { restartStrategyDescription = "default"; } parallelism = ec.getParallelism(); objectReuseEnabled = ec.isObjectReuseEnabled(); if (ec.getGlobalJobParameters() != null && ec.getGlobalJobParameters().toMap() != null) { globalJobParameters = ec.getGlobalJobParameters().toMap(); } else { globalJobParameters = Collections.emptyMap(); } }
public ArchivedExecutionConfig(ExecutionConfig ec) { executionMode = ec.getExecutionMode().name(); if (ec.getRestartStrategy() != null) { restartStrategyDescription = ec.getRestartStrategy().getDescription(); } else { restartStrategyDescription = "default"; } parallelism = ec.getParallelism(); objectReuseEnabled = ec.isObjectReuseEnabled(); if (ec.getGlobalJobParameters() != null && ec.getGlobalJobParameters().toMap() != null) { globalJobParameters = ec.getGlobalJobParameters().toMap(); } else { globalJobParameters = Collections.emptyMap(); } }
if (interval > 0) { if (streamGraph.getExecutionConfig().getRestartStrategy() == null) {
jobGraph.getSerializedExecutionConfig() .deserializeValue(userCodeLoader) .getRestartStrategy();
jobGraph.getSerializedExecutionConfig() .deserializeValue(userCodeLoader) .getRestartStrategy();
jobGraph.getSerializedExecutionConfig() .deserializeValue(userCodeLoader) .getRestartStrategy();
executionConfig.getRestartStrategy();