You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by tillrohrmann <gi...@git.apache.org> on 2016/02/16 15:34:35 UTC

[GitHub] flink pull request: [FLINK-3410] [restart] Choose NoRestart strate...

GitHub user tillrohrmann opened a pull request:

    https://github.com/apache/flink/pull/1643

    [FLINK-3410] [restart] Choose NoRestart strategy if the number of retries is set to 0

    This fixes the problem that when checkpointing is enabled and the number of execution retries is set to `0` that the automatic restarting should be deactivated. This is consistent with the semantics before the restart strategies where introduced.
    
    Be aware, though, that whenever you enable checkpointing for streaming jobs, the cluster wide default restart strategy which is set in the configuration will always be overwritten. Either by manually setting a restart strategy or by automatically setting a `FixedDelayRestartStrategy(Integer.MAX_VALUE, 10000)` strategy in the `StreamingJobGraphGenerator` if nothing was specified. That is consistent with the previous behaviour where all default execution retry attempts set in the configuration where overwritten in case of a checkpointed streaming job.
    
    Additionally, this PR sets the default retry delay to 10000 ms and disallows to set it to negative values. Before, the default execution retry delay would have been used if the delay in the `ExecutionConfig` was set to `-1`. However, with the new `RestartStrategies` there is no longer the possibility to set an explicit execution retry delay independent of the number of retries in the configuration file. Therefore it is no longer possible to set the number of execution retries in the configuration file and to specify the execution retry delay in the `ExecutionConfig` or vice versa. Both have to be defined either in the `ExecutionConfig` or the configuration file.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tillrohrmann/flink fixRestartStrategy

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/1643.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1643
    
----
commit 36ef22bc3d5491c67165a3ee1d4e08663723260b
Author: Till Rohrmann <tr...@apache.org>
Date:   2016-02-16T00:15:39Z

    [FLINK-3410] [restart] Choose NoRestart strategy if the number of retries is set to 0
    
    Add test case

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-3410] [restart] Choose NoRestart strate...

Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1643#discussion_r53020089
  
    --- Diff: flink-core/src/main/java/org/apache/flink/api/common/ExecutionConfig.java ---
    @@ -354,9 +358,9 @@ public ExecutionConfig setNumberOfExecutionRetries(int numberOfExecutionRetries)
     	 */
     	@Deprecated
     	public ExecutionConfig setExecutionRetryDelay(long executionRetryDelay) {
    -		if (executionRetryDelay < -1 ) {
    +		if (executionRetryDelay < 0 ) {
     			throw new IllegalArgumentException(
    -				"The delay between reties must be non-negative, or -1 (use system default)");
    +				"The delay between reties must be non-negative.");
    --- End diff --
    
    we can fix this type while we're at it: reties:retries


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-3410] [restart] Choose NoRestart strate...

Posted by tillrohrmann <gi...@git.apache.org>.
Github user tillrohrmann commented on the pull request:

    https://github.com/apache/flink/pull/1643#issuecomment-187605065
  
    Thanks for the review @zentol. Will merge it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-3410] [restart] Choose NoRestart strate...

Posted by tillrohrmann <gi...@git.apache.org>.
Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1643#discussion_r53022123
  
    --- Diff: flink-core/src/main/java/org/apache/flink/api/common/ExecutionConfig.java ---
    @@ -354,9 +358,9 @@ public ExecutionConfig setNumberOfExecutionRetries(int numberOfExecutionRetries)
     	 */
     	@Deprecated
     	public ExecutionConfig setExecutionRetryDelay(long executionRetryDelay) {
    -		if (executionRetryDelay < -1 ) {
    +		if (executionRetryDelay < 0 ) {
     			throw new IllegalArgumentException(
    -				"The delay between reties must be non-negative, or -1 (use system default)");
    +				"The delay between reties must be non-negative.");
    --- End diff --
    
    Good catch. Overlooked the typo. Will fix it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-3410] [restart] Choose NoRestart strate...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/flink/pull/1643


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---