Repository: reef Updated Branches: refs/heads/master cf2f146a1 -> 42aa9462b
[REEF-1503] Do not shut down driver on attempt to send close message to a non-running task This change replaces throwing exception on attempt to send close message to a task which is not running with writing a log. JIRA: [REEF-1503](https://issues.apache.org/jira/browse/REEF-1503) Pull request: This closes #1083 Project: http://git-wip-us.apache.org/repos/asf/reef/repo Commit: http://git-wip-us.apache.org/repos/asf/reef/commit/42aa9462 Tree: http://git-wip-us.apache.org/repos/asf/reef/tree/42aa9462 Diff: http://git-wip-us.apache.org/repos/asf/reef/diff/42aa9462 Branch: refs/heads/master Commit: 42aa9462bde5a7ea32a97aaadb3227a9963d1031 Parents: cf2f146 Author: Mariia Mykhailova <[email protected]> Authored: Mon Aug 1 17:51:49 2016 -0700 Committer: Sergey Dudoladov <[email protected]> Committed: Wed Aug 3 15:14:41 2016 -0700 ---------------------------------------------------------------------- .../apache/reef/runtime/common/driver/task/RunningTaskImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/reef/blob/42aa9462/lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/driver/task/RunningTaskImpl.java ---------------------------------------------------------------------- diff --git a/lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/driver/task/RunningTaskImpl.java b/lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/driver/task/RunningTaskImpl.java index 76193f2..e00579d 100644 --- a/lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/driver/task/RunningTaskImpl.java +++ b/lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/driver/task/RunningTaskImpl.java @@ -92,7 +92,7 @@ public final class RunningTaskImpl implements RunningTask { .build(); this.evaluatorManager.sendContextControlMessage(contextControlProto); } else { - LOG.log(Level.FINE, "Ignoring call to .close() because the task is no longer RUNNING."); + LOG.log(Level.INFO, "Ignoring call to .close() because the task is no longer RUNNING."); } } @@ -107,7 +107,8 @@ public final class RunningTaskImpl implements RunningTask { .build(); this.evaluatorManager.sendContextControlMessage(contextControlProto); } else { - throw new RuntimeException("Trying to send a message to a Task that is no longer RUNNING."); + LOG.log(Level.INFO, "Ignoring call to .close(byte[] message) because the task is no longer RUNNING " + + "(see REEF-1503 for an example of scenario in which this happens)."); } }
