Github user witgo commented on a diff in the pull request:

    https://github.com/apache/spark/pull/2379#discussion_r17646251
  
    --- Diff: 
core/src/main/scala/org/apache/spark/deploy/worker/WorkerArguments.scala ---
    @@ -47,14 +48,15 @@ private[spark] class WorkerArguments(args: 
Array[String], conf: SparkConf) {
       if (System.getenv("SPARK_WORKER_WEBUI_PORT") != null) {
         webUiPort = System.getenv("SPARK_WORKER_WEBUI_PORT").toInt
       }
    -  if (conf.contains("spark.worker.ui.port")) {
    -    webUiPort = conf.get("spark.worker.ui.port").toInt
    +  if (System.getenv("spark.worker.ui.port")!= null) {
    +    webUiPort = System.getenv("spark.worker.ui.port").toInt
    --- End diff --
    
    是这样的:在spark的源码中有非常多这样的代码:` val conf = 
new SparkConf` 例如:
    
[SparkHadoopUtil.scala#L38](https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/deploy/SparkHadoopUtil.scala#L38)
 
,[EventLoggingListener.scala#L216](https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/scheduler/EventLoggingListener.scala#L216),
    这要求我们必须要设置`system property `. 
    
    这样的话如果不改变初始话顺序, 我们需要同时设置`conf` 
和 `sys.props`. 


---
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]

Reply via email to