[ https://issues.apache.org/jira/browse/FLINK-2488?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15043996#comment-15043996 ]
ASF GitHub Bot commented on FLINK-2488: --------------------------------------- Github user StephanEwen commented on a diff in the pull request: https://github.com/apache/flink/pull/1386#discussion_r46773689 --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java --- @@ -240,14 +234,13 @@ public Task(TaskDeploymentDescriptor tdd, checkArgument(tdd.getNumberOfSubtasks() > 0); checkArgument(tdd.getIndexInSubtaskGroup() >= 0); checkArgument(tdd.getIndexInSubtaskGroup() < tdd.getNumberOfSubtasks()); + checkArgument(tdd.getAttemptNumber() >= 0); --- End diff -- You can probably skip these checks, given that `TaskInfo` has these checks already... > Expose attemptNumber in RuntimeContext > -------------------------------------- > > Key: FLINK-2488 > URL: https://issues.apache.org/jira/browse/FLINK-2488 > Project: Flink > Issue Type: Improvement > Components: JobManager, TaskManager > Affects Versions: 0.10.0 > Reporter: Robert Metzger > Assignee: Sachin Goel > Priority: Minor > > It would be nice to expose the attemptNumber of a task in the > {{RuntimeContext}}. > This would allow user code to behave differently in restart scenarios. -- This message was sent by Atlassian JIRA (v6.3.4#6332)