spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andrewo...@apache.org
Subject spark git commit: [SPARK-12386][CORE] Fix NPE when spark.executor.port is set.
Date Thu, 17 Dec 2015 03:48:00 GMT
Repository: spark
Updated Branches:
  refs/heads/branch-1.6 154567dca -> 4ad08035d


[SPARK-12386][CORE] Fix NPE when spark.executor.port is set.

Author: Marcelo Vanzin <vanzin@cloudera.com>

Closes #10339 from vanzin/SPARK-12386.

(cherry picked from commit d1508dd9b765489913bc948575a69ebab82f217b)
Signed-off-by: Andrew Or <andrew@databricks.com>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/4ad08035
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/4ad08035
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/4ad08035

Branch: refs/heads/branch-1.6
Commit: 4ad08035d28b8f103132da9779340c5e64e2d1c2
Parents: 154567d
Author: Marcelo Vanzin <vanzin@cloudera.com>
Authored: Wed Dec 16 19:47:49 2015 -0800
Committer: Andrew Or <andrew@databricks.com>
Committed: Wed Dec 16 19:47:57 2015 -0800

----------------------------------------------------------------------
 core/src/main/scala/org/apache/spark/SparkEnv.scala | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/4ad08035/core/src/main/scala/org/apache/spark/SparkEnv.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/SparkEnv.scala b/core/src/main/scala/org/apache/spark/SparkEnv.scala
index 84230e3..52acde1 100644
--- a/core/src/main/scala/org/apache/spark/SparkEnv.scala
+++ b/core/src/main/scala/org/apache/spark/SparkEnv.scala
@@ -256,7 +256,12 @@ object SparkEnv extends Logging {
       if (rpcEnv.isInstanceOf[AkkaRpcEnv]) {
         rpcEnv.asInstanceOf[AkkaRpcEnv].actorSystem
       } else {
-        val actorSystemPort = if (port == 0) 0 else rpcEnv.address.port + 1
+        val actorSystemPort =
+          if (port == 0 || rpcEnv.address == null) {
+            port
+          } else {
+            rpcEnv.address.port + 1
+          }
         // Create a ActorSystem for legacy codes
         AkkaUtils.createActorSystem(
           actorSystemName + "ActorSystem",


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org


Mime
View raw message