Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Feature/job plugins #706

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions aztk/spark/models/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ def __init__(
max_dedicated_nodes=0,
max_low_pri_nodes=0,
subnet_id=None,
plugins=None,
scheduling_target: SchedulingTarget = None,
worker_on_master=None,
):
Expand All @@ -199,6 +200,7 @@ def __init__(
self.max_dedicated_nodes = max_dedicated_nodes
self.max_low_pri_nodes = max_low_pri_nodes
self.subnet_id = subnet_id
self.plugins = plugins
self.worker_on_master = worker_on_master
self.scheduling_target = scheduling_target

Expand All @@ -210,6 +212,7 @@ def to_cluster_config(self):
size=self.max_dedicated_nodes,
size_low_priority=self.max_low_pri_nodes,
subnet_id=self.subnet_id,
plugins=self.plugins,
worker_on_master=self.worker_on_master,
spark_configuration=self.spark_configuration,
scheduling_target=self.scheduling_target,
Expand Down
5 changes: 5 additions & 0 deletions aztk_cli/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ def __init__(self):
self.spark_env_sh = None
self.core_site_xml = None
self.subnet_id = None
self.plugins = []
self.worker_on_master = None
self.scheduling_target = None
self.jars = []
Expand All @@ -197,6 +198,10 @@ def _merge_dict(self, config):
if cluster_configuration.get("size_low_priority") is not None:
self.max_low_pri_nodes = cluster_configuration.get("size_low_priority")
self.subnet_id = cluster_configuration.get("subnet_id")
if cluster_configuration.get("plugins") is not None:
for plugin in cluster_configuration.get("plugins"):
ref = PluginReference.from_dict(plugin)
self.plugins.append(ref.get_plugin())
self.worker_on_master = cluster_configuration.get("worker_on_master")
scheduling_target = cluster_configuration.get("scheduling_target")
if scheduling_target:
Expand Down
1 change: 1 addition & 0 deletions aztk_cli/spark/endpoints/job/submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def execute(args: typing.NamedTuple):
max_dedicated_nodes=job_conf.max_dedicated_nodes,
max_low_pri_nodes=job_conf.max_low_pri_nodes,
subnet_id=job_conf.subnet_id,
plugins=job_conf.plugins,
worker_on_master=job_conf.worker_on_master,
scheduling_target=job_conf.scheduling_target,
)
Expand Down