Skip to content

Commit d6c5d65

Browse files
author
Allan Douglas R. de Oliveira
committed
Added master opts parameter
1 parent 6c34671 commit d6c5d65

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

ec2/deploy.generic/root/spark-ec2/ec2-variables.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ export SHARK_VERSION="{{shark_version}}"
2929
export HADOOP_MAJOR_VERSION="{{hadoop_major_version}}"
3030
export SWAP_MB="{{swap}}"
3131
export SPARK_WORKER_INSTANCES="{{spark_worker_instances}}"
32-
32+
export SPARK_MASTER_OPTS="{{spark_master_opts}}"

ec2/spark_ec2.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ def parse_args():
105105
help="Launch fresh slaves, but use an existing stopped master if possible")
106106
parser.add_option("--worker-instances", type="int", default=1,
107107
help="Number of instances per worker: variable SPARK_WORKER_INSTANCES (default: 1)")
108+
parser.add_option("--master-opts", type="string", default="",
109+
help="Extra options to give to master through SPARK_MASTER_OPTS variable (e.g -Dspark.worker.timeout=180)")
110+
108111

109112

110113
(opts, args) = parser.parse_args()
@@ -555,7 +558,8 @@ def deploy_files(conn, root_dir, opts, master_nodes, slave_nodes, modules):
555558
"spark_version": spark_v,
556559
"shark_version": shark_v,
557560
"hadoop_major_version": opts.hadoop_major_version,
558-
"spark_worker_instances": "%d" % opts.worker_instances
561+
"spark_worker_instances": "%d" % opts.worker_instances,
562+
"spark_master_opts": opts.master_opts
559563
}
560564

561565
# Create a temp directory in which we will place all the files to be

0 commit comments

Comments
 (0)