Repository: spark Updated Branches: refs/heads/branch-1.6 208348595 -> 16b7f1dfc
[SPARK-14391][LAUNCHER] Fix launcher communication test, take 2. There's actually a race here: the state of the handler was changed before the connection was set, so the test code could be notified of the state change, wake up, and still see the connection as null, triggering the assert. Author: Marcelo Vanzin <van...@cloudera.com> Closes #12785 from vanzin/SPARK-14391. (cherry picked from commit 73c20bf32524c2232febc8c4b12d5fa228347163) Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/16b7f1df Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/16b7f1df Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/16b7f1df Branch: refs/heads/branch-1.6 Commit: 16b7f1dfc0570f32e23f640e063d8e7fd9115792 Parents: 2083485 Author: Marcelo Vanzin <van...@cloudera.com> Authored: Fri Apr 29 23:13:50 2016 -0700 Committer: Marcelo Vanzin <van...@cloudera.com> Committed: Mon Jun 20 09:55:06 2016 -0700 ---------------------------------------------------------------------- .../src/main/java/org/apache/spark/launcher/LauncherServer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/16b7f1df/launcher/src/main/java/org/apache/spark/launcher/LauncherServer.java ---------------------------------------------------------------------- diff --git a/launcher/src/main/java/org/apache/spark/launcher/LauncherServer.java b/launcher/src/main/java/org/apache/spark/launcher/LauncherServer.java index 414ffc2..e493514 100644 --- a/launcher/src/main/java/org/apache/spark/launcher/LauncherServer.java +++ b/launcher/src/main/java/org/apache/spark/launcher/LauncherServer.java @@ -298,8 +298,8 @@ class LauncherServer implements Closeable { Hello hello = (Hello) msg; ChildProcAppHandle handle = pending.remove(hello.secret); if (handle != null) { - handle.setState(SparkAppHandle.State.CONNECTED); handle.setConnection(this); + handle.setState(SparkAppHandle.State.CONNECTED); this.handle = handle; } else { throw new IllegalArgumentException("Received Hello for unknown client."); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org