Starting master as a worker too

This commit is contained in:
Timothee Guerin 2017-07-12 12:22:08 -07:00
Родитель 96f94e7714
Коммит 1ef325056a
2 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -15,7 +15,7 @@ def setup_as_master():
print("Setting up as master.")
spark.setup_connection()
spark.start_spark_master()
# spark.start_spark_worker()
spark.start_spark_worker()
def setup_as_worker():

Просмотреть файл

@ -120,10 +120,14 @@ def start_jupyter():
def wait_for_master():
print("Waiting for master to be ready.")
master_node_ip = pick_master.get_master_node_id(
master_node_id = pick_master.get_master_node_id(
batch_client.pool.get(config.pool_id))
if master_node_id == config.node_id:
return
while True:
master_node = get_node(master_node_ip)
master_node = get_node(master_node_id)
if master_node.state in [batchmodels.ComputeNodeState.idle, batchmodels.ComputeNodeState.running]:
break