[ https://issues.apache.org/jira/browse/FLINK-2488?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14699333#comment-14699333 ]
ASF GitHub Bot commented on FLINK-2488: --------------------------------------- Github user StephanEwen commented on the pull request: https://github.com/apache/flink/pull/1026#issuecomment-131767636 Looks mostly good. The `TaskRuntimeInfo` is now a bit strange. It contains some runtime info for tasks (attempt number) but not all (subtasks, etc). The attempt number is in the `TaskDeploymentDescriptor` anyways, so why copy it in addition to the `TaskRuntimeInfo`? Before, the `TaskManagerInfo` was clearly the context info of the TaskManager that was the same for all tasks and there was no duplicate information. Looks like the motivation was to minimize the number of objects passed to the `RuntimeContext`. In that case, why not create a `RuntimeInfo` for the task (keep the `TaskManagerInfo`), put all the task-specific information in there, pass it to the `RuntimeEnvironment` and `RuntimeContext` and let them return all info like `getTaskName` and `getIndexOfThisSubtask` from there? > 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 > 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)