[SPARK-12386][CORE] Fix NPE when spark.executor.port is set.
Author: Marcelo Vanzin <vanzin@cloudera.com> Closes #10339 from vanzin/SPARK-12386.
This commit is contained in:
parent
fdb3822756
commit
d1508dd9b7
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue