[ 
https://issues.apache.org/jira/browse/FLINK-2488?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14699319#comment-14699319
 ] 

ASF GitHub Bot commented on FLINK-2488:
---------------------------------------

Github user StephanEwen commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1026#discussion_r37173778
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/deployment/TaskDeploymentDescriptor.java
 ---
    @@ -120,7 +125,7 @@ public TaskDeploymentDescriptor(
                        List<InputGateDeploymentDescriptor> inputGates,
                        List<BlobKey> requiredJarFiles, int targetSlotNumber) {
     
    -           this(jobID, vertexID, executionId, taskName, 
indexInSubtaskGroup, numberOfSubtasks,
    +           this(jobID, vertexID, executionId, taskName, 
indexInSubtaskGroup, numberOfSubtasks, 0,
    --- End diff --
    
    I think such constructors with default values are dangerous, as people tend 
to call the wrong constructors.
    Someone who creates the deployment descriptor should think about providing 
the attempt number.


> 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)

Reply via email to