Github user jerryshao commented on a diff in the pull request:
https://github.com/apache/spark/pull/18290#discussion_r121887546
--- Diff: core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala
---
@@ -742,6 +742,17 @@ private[deploy] object Worker extends Logging {
val args = new WorkerArguments(argStrings, conf)
val rpcEnv = startRpcEnvAndEndpoint(args.host, args.port,
args.webUiPort, args.cores,
args.memory, args.masters, args.workDir, conf = conf)
+ // With external shuffle service enabled, if we request to launch
multiple workers on one host,
+ // we can only successfully launch the first worker and the rest
fails, because with the port
+ // bounded, we may launch no more than one external shuffle service on
each host.
+ // When this happens, we should give explicit reason of failure
instead of fail silently. For
+ // more detail see SPARK-20989.
+ val externalShuffleServiceEnabled =
conf.getBoolean("spark.shuffle.service.enabled", false)
+ val sparkWorkerInstances =
Option(System.getenv("SPARK_WORKER_INSTANCES")).getOrElse("1").toInt
--- End diff --
This can be simplified as `scala.sys.env.getOrElse(...)`.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]