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

    https://github.com/apache/flink/pull/750#discussion_r46172767
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/Execution.java
 ---
    @@ -402,21 +405,53 @@ public void onComplete(Throwable failure, Object 
success) throws Throwable {
                }
        }
     
    +   public void stop() {
    +           // sends stop RPC call
    +
    +           final SimpleSlot slot = this.assignedResource;
    +
    +           if (slot != null) {
    +                   final ActorGateway gateway = 
slot.getInstance().getActorGateway();
    +
    +                   Future<Object> stopResult = gateway.retry(
    +                           new StopTask(attemptId),
    +                           NUM_STOP_CALL_TRIES,
    +                           timeout,
    +                           executionContext);
    +
    +                   stopResult.onComplete(new OnComplete<Object>() {
    +                           @Override
    +                           public void onComplete(Throwable failure, 
Object success) throws Throwable {
    +                                   if (failure != null) {
    +                                           fail(new Exception("Task could 
not be stopped.", failure));
    +                                   } else {
    +                                           TaskOperationResult result = 
(TaskOperationResult) success;
    +                                           if (!result.success()) {
    +                                                   LOG.debug("Stopping 
task call did not find task. Probably akka message call race.");
    --- End diff --
    
    In the case of an unsuccessful `TaskOperationResult` it might be 
interesting to also log the `description` field.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to