aboutsummaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorbomeng <bmeng@us.ibm.com>2016-06-12 14:25:48 +0100
committerSean Owen <sowen@cloudera.com>2016-06-12 14:25:48 +0100
commit50248dcfff3ba79b73323f3a804c1e19a8be6097 (patch)
treeb1ad5729b2fe3cefb3142b17f2fff312d7e7a836 /core/src
parent3fd3ee038b89821f51f30a4ecd4452b5b3bc6568 (diff)
downloadspark-50248dcfff3ba79b73323f3a804c1e19a8be6097.tar.gz
spark-50248dcfff3ba79b73323f3a804c1e19a8be6097.tar.bz2
spark-50248dcfff3ba79b73323f3a804c1e19a8be6097.zip
[SPARK-15806][DOCUMENTATION] update doc for SPARK_MASTER_IP
## What changes were proposed in this pull request? SPARK_MASTER_IP is a deprecated environment variable. It is replaced by SPARK_MASTER_HOST according to MasterArguments.scala. ## How was this patch tested? Manually verified. Author: bomeng <bmeng@us.ibm.com> Closes #13543 from bomeng/SPARK-15806.
Diffstat (limited to 'core/src')
-rw-r--r--core/src/main/scala/org/apache/spark/deploy/master/MasterArguments.scala8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/src/main/scala/org/apache/spark/deploy/master/MasterArguments.scala b/core/src/main/scala/org/apache/spark/deploy/master/MasterArguments.scala
index 585e0839d0..c63793c16d 100644
--- a/core/src/main/scala/org/apache/spark/deploy/master/MasterArguments.scala
+++ b/core/src/main/scala/org/apache/spark/deploy/master/MasterArguments.scala
@@ -20,18 +20,24 @@ package org.apache.spark.deploy.master
import scala.annotation.tailrec
import org.apache.spark.SparkConf
+import org.apache.spark.internal.Logging
import org.apache.spark.util.{IntParam, Utils}
/**
* Command-line parser for the master.
*/
-private[master] class MasterArguments(args: Array[String], conf: SparkConf) {
+private[master] class MasterArguments(args: Array[String], conf: SparkConf) extends Logging {
var host = Utils.localHostName()
var port = 7077
var webUiPort = 8080
var propertiesFile: String = null
// Check for settings in environment variables
+ if (System.getenv("SPARK_MASTER_IP") != null) {
+ logWarning("SPARK_MASTER_IP is deprecated, please use SPARK_MASTER_HOST")
+ host = System.getenv("SPARK_MASTER_IP")
+ }
+
if (System.getenv("SPARK_MASTER_HOST") != null) {
host = System.getenv("SPARK_MASTER_HOST")
}