Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/4505#discussion_r25010786
--- Diff:
core/src/main/scala/org/apache/spark/deploy/worker/WorkerArguments.scala ---
@@ -23,46 +23,56 @@ import org.apache.spark.util.{IntParam, MemoryParam,
Utils}
import org.apache.spark.SparkConf
/**
- * Command-line parser for the worker.
+ * Arguments parser for the worker.
*/
private[spark] class WorkerArguments(args: Array[String], conf: SparkConf)
{
- var host = Utils.localHostName()
- var port = 0
- var webUiPort = 8081
- var cores = inferDefaultCores()
- var memory = inferDefaultMemory()
+ var host: String = null
+ var port: Int = -1
+ var webUiPort: Int = -1
+ var cores: Int = -1
+ var memory: Int = -1
--- End diff --
you don't need to change the defaults here if you do the following down
there:
```
port = sys.env.get(...)
.orElse(conf.getOption(...))
.getOrElse(port)
```
---
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]