Skip to content

Commit

Permalink
revert unneeded change
Browse files Browse the repository at this point in the history
  • Loading branch information
Ngone51 committed Jun 21, 2019
1 parent a1cd955 commit 0960bcf
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 18 deletions.
2 changes: 0 additions & 2 deletions conf/spark-env.sh.template
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@
# - SPARK_WORKER_PORT / SPARK_WORKER_WEBUI_PORT, to use non-default ports for the worker
# - SPARK_WORKER_DIR, to set the working directory of worker processes
# - SPARK_WORKER_OPTS, to set config properties only for the worker (e.g. "-Dx=y")
# - SPARK_WORKER_RESOURCE_FILE, to set the path for resource file.
# - SPARK_WORKER_RESOURCE_DISCOVERY_SCRIPT, to set the path for resource discovery scripts.
# - SPARK_DAEMON_MEMORY, to allocate to the master, worker and history server themselves (default: 1g).
# - SPARK_HISTORY_OPTS, to set config properties only for the history server (e.g. "-Dx=y")
# - SPARK_SHUFFLE_OPTS, to set config properties only for the external shuffle service (e.g. "-Dx=y")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,6 @@ private[deploy] object Worker extends Logging {
rpcEnv.awaitTermination()
}

// scalastyle:off argcount
def startRpcEnvAndEndpoint(
host: String,
port: Int,
Expand All @@ -830,7 +829,6 @@ private[deploy] object Worker extends Logging {
workerNumber: Option[Int] = None,
conf: SparkConf = new SparkConf,
resourceFileOpt: Option[String] = None): RpcEnv = {
// scalastyle:on argcount

// The LocalSparkCluster runs multiple local sparkWorkerX RPC Environments
val systemName = SYSTEM_NAME + workerNumber.map(_.toString).getOrElse("")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,19 +126,19 @@ private[worker] class WorkerArguments(args: Array[String], conf: SparkConf) {
// scalastyle:off println
System.err.println(
"Usage: Worker [options] <master>\n" +
"\n" +
"Master must be a URL of the form spark://hostname:port\n" +
"\n" +
"Options:\n" +
" -c CORES, --cores CORES Number of cores to use\n" +
" -m MEM, --memory MEM Amount of memory to use (e.g. 1000M, 2G)\n" +
" -d DIR, --work-dir DIR Directory to run apps in (default: SPARK_HOME/work)\n" +
" -i HOST, --ip IP Hostname to listen on (deprecated, please use --host or -h)\n" +
" -h HOST, --host HOST Hostname to listen on\n" +
" -p PORT, --port PORT Port to listen on (default: random)\n" +
" --webui-port PORT Port for web UI (default: 8081)\n" +
" --properties-file FILE Path to a custom Spark properties file.\n" +
" Default is conf/spark-defaults.conf.")
"\n" +
"Master must be a URL of the form spark://hostname:port\n" +
"\n" +
"Options:\n" +
" -c CORES, --cores CORES Number of cores to use\n" +
" -m MEM, --memory MEM Amount of memory to use (e.g. 1000M, 2G)\n" +
" -d DIR, --work-dir DIR Directory to run apps in (default: SPARK_HOME/work)\n" +
" -i HOST, --ip IP Hostname to listen on (deprecated, please use --host or -h)\n" +
" -h HOST, --host HOST Hostname to listen on\n" +
" -p PORT, --port PORT Port to listen on (default: random)\n" +
" --webui-port PORT Port for web UI (default: 8081)\n" +
" --properties-file FILE Path to a custom Spark properties file.\n" +
" Default is conf/spark-defaults.conf.")
// scalastyle:on println
System.exit(exitCode)
}
Expand Down Expand Up @@ -168,7 +168,7 @@ private[worker] class WorkerArguments(args: Array[String], conf: SparkConf) {
totalMb = 2*1024
// scalastyle:off println
System.out.println("Failed to get total physical memory. Using " + totalMb + " MB")
// scalastyle:on println
// scalastyle:on println
}
// Leave out 1 GB for the operating system, but don't return a negative memory size
math.max(totalMb - 1024, Utils.DEFAULT_DRIVER_MEM_MB)
Expand Down

0 comments on commit 0960bcf

Please sign in to comment.