/** * Gets the number of times the system will try to re-execute failed tasks. * A value of {@code -1} indicates that the system default value (as defined * in the configuration) should be used. * * @return The number of times the system will try to re-execute failed tasks. * * @deprecated This method will be replaced by {@link #getRestartStrategy}. */ @Deprecated @PublicEvolving public int getNumberOfExecutionRetries() { return config.getNumberOfExecutionRetries(); }
/** * Gets the number of times the system will try to re-execute failed tasks. A value * of {@code -1} indicates that the system default value (as defined in the configuration) * should be used. * * @return The number of times the system will try to re-execute failed tasks. * * @deprecated This method will be replaced by {@link #getRestartStrategy}. The * {@link RestartStrategies.FixedDelayRestartStrategyConfiguration} contains the number of * execution retries. */ @Deprecated @PublicEvolving public int getNumberOfExecutionRetries() { return config.getNumberOfExecutionRetries(); }
/** * Returns the restart strategy which has been set for the current job. * * @return The specified restart configuration */ @PublicEvolving @SuppressWarnings("deprecation") public RestartStrategies.RestartStrategyConfiguration getRestartStrategy() { if (restartStrategyConfiguration instanceof RestartStrategies.FallbackRestartStrategyConfiguration) { // support the old API calls by creating a restart strategy from them if (getNumberOfExecutionRetries() > 0 && getExecutionRetryDelay() >= 0) { return RestartStrategies.fixedDelayRestart(getNumberOfExecutionRetries(), getExecutionRetryDelay()); } else if (getNumberOfExecutionRetries() == 0) { return RestartStrategies.noRestart(); } else { return restartStrategyConfiguration; } } else { return restartStrategyConfiguration; } }
@Override public String map(String value) throws Exception { Assert.assertTrue(1000 == getRuntimeContext().getExecutionConfig().getNumberOfExecutionRetries()); Assert.assertTrue(50000 == getRuntimeContext().getExecutionConfig().getTaskCancellationInterval()); return value; } });
/** * Gets the number of times the system will try to re-execute failed tasks. * A value of {@code -1} indicates that the system default value (as defined * in the configuration) should be used. * * @return The number of times the system will try to re-execute failed tasks. * * @deprecated This method will be replaced by {@link #getRestartStrategy}. */ @Deprecated @PublicEvolving public int getNumberOfExecutionRetries() { return config.getNumberOfExecutionRetries(); }
/** * Gets the number of times the system will try to re-execute failed tasks. * A value of {@code -1} indicates that the system default value (as defined * in the configuration) should be used. * * @return The number of times the system will try to re-execute failed tasks. * * @deprecated This method will be replaced by {@link #getRestartStrategy}. */ @Deprecated @PublicEvolving public int getNumberOfExecutionRetries() { return config.getNumberOfExecutionRetries(); }
/** * Gets the number of times the system will try to re-execute failed tasks. A value * of {@code -1} indicates that the system default value (as defined in the configuration) * should be used. * * @return The number of times the system will try to re-execute failed tasks. * * @deprecated This method will be replaced by {@link #getRestartStrategy}. The * {@link RestartStrategies.FixedDelayRestartStrategyConfiguration} contains the number of * execution retries. */ @Deprecated @PublicEvolving public int getNumberOfExecutionRetries() { return config.getNumberOfExecutionRetries(); }
/** * Gets the number of times the system will try to re-execute failed tasks. * A value of {@code -1} indicates that the system default value (as defined * in the configuration) should be used. * * @return The number of times the system will try to re-execute failed tasks. * * @deprecated This method will be replaced by {@link #getRestartStrategy}. */ @Deprecated @PublicEvolving public int getNumberOfExecutionRetries() { return config.getNumberOfExecutionRetries(); }
/** * Gets the number of times the system will try to re-execute failed tasks. * A value of {@code -1} indicates that the system default value (as defined * in the configuration) should be used. * * @return The number of times the system will try to re-execute failed tasks. * * @deprecated This method will be replaced by {@link #getRestartStrategy}. */ @Deprecated @PublicEvolving public int getNumberOfExecutionRetries() { return config.getNumberOfExecutionRetries(); }
/** * Gets the number of times the system will try to re-execute failed tasks. A value * of {@code -1} indicates that the system default value (as defined in the configuration) * should be used. * * @return The number of times the system will try to re-execute failed tasks. * * @deprecated This method will be replaced by {@link #getRestartStrategy}. The * {@link RestartStrategies.FixedDelayRestartStrategyConfiguration} contains the number of * execution retries. */ @Deprecated @PublicEvolving public int getNumberOfExecutionRetries() { return config.getNumberOfExecutionRetries(); }
/** * Gets the number of times the system will try to re-execute failed tasks. A value * of {@code -1} indicates that the system default value (as defined in the configuration) * should be used. * * @return The number of times the system will try to re-execute failed tasks. * * @deprecated This method will be replaced by {@link #getRestartStrategy}. The * {@link RestartStrategies.FixedDelayRestartStrategyConfiguration} contains the number of * execution retries. */ @Deprecated @PublicEvolving public int getNumberOfExecutionRetries() { return config.getNumberOfExecutionRetries(); }
/** * Returns the restart strategy which has been set for the current job. * * @return The specified restart configuration */ @PublicEvolving @SuppressWarnings("deprecation") public RestartStrategies.RestartStrategyConfiguration getRestartStrategy() { if (restartStrategyConfiguration instanceof RestartStrategies.FallbackRestartStrategyConfiguration) { // support the old API calls by creating a restart strategy from them if (getNumberOfExecutionRetries() > 0 && getExecutionRetryDelay() >= 0) { return RestartStrategies.fixedDelayRestart(getNumberOfExecutionRetries(), getExecutionRetryDelay()); } else if (getNumberOfExecutionRetries() == 0) { return RestartStrategies.noRestart(); } else { return restartStrategyConfiguration; } } else { return restartStrategyConfiguration; } }
/** * Returns the restart strategy which has been set for the current job. * * @return The specified restart configuration */ @PublicEvolving @SuppressWarnings("deprecation") public RestartStrategies.RestartStrategyConfiguration getRestartStrategy() { if (restartStrategyConfiguration == null) { // support the old API calls by creating a restart strategy from them if (getNumberOfExecutionRetries() > 0 && getExecutionRetryDelay() >= 0) { return RestartStrategies.fixedDelayRestart(getNumberOfExecutionRetries(), getExecutionRetryDelay()); } else if (getNumberOfExecutionRetries() == 0) { return RestartStrategies.noRestart(); } else { return null; } } else { return restartStrategyConfiguration; } }