aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorMark Grover <mark@apache.org>2014-03-01 16:21:22 -0800
committerPatrick Wendell <pwendell@gmail.com>2014-03-01 16:21:22 -0800
commit9aa095711858ce8670e51488f66a3d7c1a821c30 (patch)
treefeb04bc47f9156ecc1d8aa67650139fac5d81c2f /core
parent556c56689bbc32c6cec0d07b57bd3ec73ceb243e (diff)
downloadspark-9aa095711858ce8670e51488f66a3d7c1a821c30.tar.gz
spark-9aa095711858ce8670e51488f66a3d7c1a821c30.tar.bz2
spark-9aa095711858ce8670e51488f66a3d7c1a821c30.zip
[SPARK-1150] fix repo location in create script
https://spark-project.atlassian.net/browse/SPARK-1150 fix the repo location in create_release script Author: Mark Grover <mark@apache.org> Closes #48 from CodingCat/script_fixes and squashes the following commits: 01f4bf7 [Mark Grover] Fixing some nitpicks d2244d4 [Mark Grover] SPARK-676: Abbreviation in SPARK_MEM but not in SPARK_WORKER_MEMORY
Diffstat (limited to 'core')
-rw-r--r--core/src/main/scala/org/apache/spark/deploy/worker/WorkerArguments.scala10
1 files changed, 8 insertions, 2 deletions
diff --git a/core/src/main/scala/org/apache/spark/deploy/worker/WorkerArguments.scala b/core/src/main/scala/org/apache/spark/deploy/worker/WorkerArguments.scala
index d35d5be73f..52c4419639 100644
--- a/core/src/main/scala/org/apache/spark/deploy/worker/WorkerArguments.scala
+++ b/core/src/main/scala/org/apache/spark/deploy/worker/WorkerArguments.scala
@@ -18,13 +18,15 @@
package org.apache.spark.deploy.worker
import java.lang.management.ManagementFactory
+import org.apache.spark.Logging
import org.apache.spark.util.{IntParam, MemoryParam, Utils}
/**
* Command-line parser for the master.
*/
-private[spark] class WorkerArguments(args: Array[String]) {
+private[spark] class WorkerArguments(args: Array[String]) extends Logging {
+ initLogging()
var host = Utils.localHostName()
var port = 0
var webUiPort = 8081
@@ -40,9 +42,13 @@ private[spark] class WorkerArguments(args: Array[String]) {
if (System.getenv("SPARK_WORKER_CORES") != null) {
cores = System.getenv("SPARK_WORKER_CORES").toInt
}
- if (System.getenv("SPARK_WORKER_MEMORY") != null) {
+ if (System.getenv("SPARK_WORKER_MEM") != null) {
+ memory = Utils.memoryStringToMb(System.getenv("SPARK_WORKER_MEM"))
+ } else if (System.getenv("SPARK_WORKER_MEMORY") != null) {
+ logWarning("SPARK_WORKER_MEMORY is deprecated. Please use SPARK_WORKER_MEM instead")
memory = Utils.memoryStringToMb(System.getenv("SPARK_WORKER_MEMORY"))
}
+
if (System.getenv("SPARK_WORKER_WEBUI_PORT") != null) {
webUiPort = System.getenv("SPARK_WORKER_WEBUI_PORT").toInt
}