Implement job-types endpoint support methods for HDP plugin
This change implements the optional methods in the Plugins SPI to support the job-types endpoint for the HDP plugin. Config hints at this point are unchanged. Additional work may be needed to provide config-hints specific to HDP plugin versions. Change-Id: I10b155f145c79ec0ee694ac35a4c3fe679345ee3 Partial-Implements: blueprint edp-job-types-endpoint
This commit is contained in:
parent
2cc9fed940
commit
6724579ffa
@ -165,11 +165,6 @@ class AmbariPlugin(p.ProvisioningPluginBase):
|
||||
"node_groups": node_groups,
|
||||
"cluster_configs": cluster_configs})
|
||||
|
||||
def get_edp_engine(self, cluster, job_type):
|
||||
version_handler = (
|
||||
self.version_factory.get_version_handler(cluster.hadoop_version))
|
||||
return version_handler.get_edp_engine(cluster, job_type)
|
||||
|
||||
def update_infra(self, cluster):
|
||||
pass
|
||||
|
||||
@ -333,6 +328,24 @@ class AmbariPlugin(p.ProvisioningPluginBase):
|
||||
|
||||
ambari_client.cleanup(ambari_info)
|
||||
|
||||
def get_edp_engine(self, cluster, job_type):
|
||||
version_handler = (
|
||||
self.version_factory.get_version_handler(cluster.hadoop_version))
|
||||
return version_handler.get_edp_engine(cluster, job_type)
|
||||
|
||||
def get_edp_job_types(self, versions=[]):
|
||||
res = {}
|
||||
for vers in self.version_factory.get_versions():
|
||||
if not versions or vers in versions:
|
||||
vh = self.version_factory.get_version_handler(vers)
|
||||
res[vers] = vh.get_edp_job_types()
|
||||
return res
|
||||
|
||||
def get_edp_config_hints(self, job_type, version):
|
||||
version_handler = (
|
||||
self.version_factory.get_version_handler(version))
|
||||
return version_handler.get_edp_config_hints(job_type)
|
||||
|
||||
def decommission_nodes(self, cluster, instances):
|
||||
LOG.info(_LI('AmbariPlugin: decommission_nodes called for '
|
||||
'HDP version = %s'), cluster.hadoop_version)
|
||||
|
@ -62,6 +62,14 @@ class AbstractVersionHandler(object):
|
||||
def get_edp_engine(self, cluster, job_type):
|
||||
return
|
||||
|
||||
@abc.abstractmethod
|
||||
def get_edp_job_types(self):
|
||||
return []
|
||||
|
||||
@abc.abstractmethod
|
||||
def get_edp_config_hints(self, job_type):
|
||||
return {}
|
||||
|
||||
@abc.abstractmethod
|
||||
def get_open_ports(self, node_group):
|
||||
return []
|
||||
|
@ -134,6 +134,12 @@ class VersionHandler(avm.AbstractVersionHandler):
|
||||
return edp_engine.EdpOozieEngine(cluster)
|
||||
return None
|
||||
|
||||
def get_edp_job_types(self):
|
||||
return edp_engine.EdpOozieEngine.get_supported_job_types()
|
||||
|
||||
def get_edp_config_hints(self, job_type):
|
||||
return edp_engine.EdpOozieEngine.get_possible_job_config(job_type)
|
||||
|
||||
def get_open_ports(self, node_group):
|
||||
ports = [8660] # for Ganglia
|
||||
|
||||
|
@ -124,6 +124,12 @@ class VersionHandler(avm.AbstractVersionHandler):
|
||||
return edp_engine.EdpOozieEngine(cluster)
|
||||
return None
|
||||
|
||||
def get_edp_job_types(self):
|
||||
return edp_engine.EdpOozieEngine.get_supported_job_types()
|
||||
|
||||
def get_edp_config_hints(self, job_type):
|
||||
return edp_engine.EdpOozieEngine.get_possible_job_config(job_type)
|
||||
|
||||
def get_open_ports(self, node_group):
|
||||
ports = [8660] # for Ganglia
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user