http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/OOZIE/package/scripts/oozie_server.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/OOZIE/package/scripts/oozie_server.py b/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/OOZIE/package/scripts/oozie_server.py index d6d6d37..11c8c8e 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/OOZIE/package/scripts/oozie_server.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/OOZIE/package/scripts/oozie_server.py @@ -42,9 +42,6 @@ from oozie_service import oozie_service class OozieServer(Script): - def get_component_name(self): - return "oozie-server" - def install(self, env): self.install_packages(env) @@ -61,9 +58,8 @@ class OozieServer(Script): # This is required as both need to be pointing to new installed oozie version. # Sets the symlink : eg: /usr/hdp/current/oozie-client -> /usr/hdp/2.3.x.y-<version>/oozie - stack_select.select("oozie-client", params.version) # Sets the symlink : eg: /usr/hdp/current/oozie-server -> /usr/hdp/2.3.x.y-<version>/oozie - stack_select.select("oozie-server", params.version) + stack_select.select_packages(params.version) env.set_params(params) oozie(is_server=True) @@ -181,7 +177,7 @@ class OozieServer(Script): oozie_server_upgrade.backup_configuration() conf_select.select(params.stack_name, "oozie", params.version) - stack_select.select("oozie-server", params.version) + stack_select.select_packages(params.version) #Execute(format("stack-select set oozie-server {version}")) oozie_server_upgrade.restore_configuration()
http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/PIG/package/scripts/pig_client.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/PIG/package/scripts/pig_client.py b/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/PIG/package/scripts/pig_client.py index bd08b56..96a48c1 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/PIG/package/scripts/pig_client.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/PIG/package/scripts/pig_client.py @@ -39,9 +39,6 @@ class PigClient(Script): @OsFamilyImpl(os_family=OsFamilyImpl.DEFAULT) class PigClientLinux(PigClient): - def get_component_name(self): - return "hadoop-client" - def pre_upgrade_restart(self, env, upgrade_type=None): import params env.set_params(params) @@ -49,7 +46,7 @@ class PigClientLinux(PigClient): if params.version and compare_versions(format_stack_version(params.version), '4.0.0.0') >= 0: conf_select.select(params.stack_name, "pig", params.version) conf_select.select(params.stack_name, "hadoop", params.version) - stack_select.select("hadoop-client", params.version) # includes pig-client + stack_select.select_packages(params.version) def install(self, env): self.install_packages(env) http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/SLIDER/package/scripts/slider_client.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/SLIDER/package/scripts/slider_client.py b/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/SLIDER/package/scripts/slider_client.py index 11e3cd3..e5c1483 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/SLIDER/package/scripts/slider_client.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/SLIDER/package/scripts/slider_client.py @@ -26,23 +26,19 @@ from slider import slider class SliderClient(Script): - def get_component_name(self): - return "slider-client" - def pre_upgrade_restart(self, env, upgrade_type=None): import params env.set_params(params) if params.version and compare_versions(format_stack_version(params.version), '4.0.0.0') >= 0: conf_select.select(params.stack_name, "slider", params.version) - stack_select.select("slider-client", params.version) + stack_select.select_packages(params.version) #Execute(format("stack-select set slider-client {version}")) # also set all of the hadoop clients since slider client is upgraded as # part of the final "CLIENTS" group and we need to ensure that # hadoop-client is also set conf_select.select(params.stack_name, "hadoop", params.version) - stack_select.select("hadoop-client", params.version) #Execute(format("stack-select set hadoop-client {version}")) def install(self, env): http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/SOLR/package/scripts/solr_server.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/SOLR/package/scripts/solr_server.py b/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/SOLR/package/scripts/solr_server.py index 5cefc73..3605264 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/SOLR/package/scripts/solr_server.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/SOLR/package/scripts/solr_server.py @@ -43,7 +43,7 @@ class SolrServer(Script): import params env.set_params(params) if params.version and compare_versions(format_stack_version(params.version), '4.1.0.0') >= 0: - stack_select.select("solr-server", params.version) + stack_select.select_packages(params.version) call_conf_select = True conf_dir = '/usr/iop/4.1.0.0/solr/conf' http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/SPARK/package/scripts/job_history_server.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/SPARK/package/scripts/job_history_server.py b/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/SPARK/package/scripts/job_history_server.py index 439defe..654b88a 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/SPARK/package/scripts/job_history_server.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/SPARK/package/scripts/job_history_server.py @@ -32,16 +32,13 @@ from spark import * class JobHistoryServer(Script): - def get_component_name(self): - return "spark-historyserver" - def pre_upgrade_restart(self, env, upgrade_type=None): import params env.set_params(params) if params.version and compare_versions(format_stack_version(params.version), '4.0.0.0') >= 0: conf_select.select(params.stack_name, "spark", params.version) - stack_select.select("spark-historyserver", params.version) + stack_select.select_packages(params.version) #Execute(format("stack-select set spark-historyserver {version}")) def install(self, env): http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/SPARK/package/scripts/spark_client.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/SPARK/package/scripts/spark_client.py b/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/SPARK/package/scripts/spark_client.py index 2345c63..7f2e7fc 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/SPARK/package/scripts/spark_client.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/SPARK/package/scripts/spark_client.py @@ -31,16 +31,13 @@ from spark import spark class SparkClient(Script): - def get_component_name(self): - return "spark-client" - def pre_upgrade_restart(self, env, upgrade_type=None): import params env.set_params(params) if params.version and compare_versions(format_stack_version(params.version), '4.0.0.0') >= 0: conf_select.select(params.stack_name, "spark", params.version) - stack_select.select("spark-client", params.version) + stack_select.select_packages(params.version) #Execute(format("stack-select set spark-client {version}")) def install(self, env): http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/SPARK/package/scripts/spark_thrift_server.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/SPARK/package/scripts/spark_thrift_server.py b/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/SPARK/package/scripts/spark_thrift_server.py index 39e15d3..75908a7 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/SPARK/package/scripts/spark_thrift_server.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/SPARK/package/scripts/spark_thrift_server.py @@ -33,17 +33,13 @@ from spark import * class ThriftServer(Script): - def get_component_name(self): - return "spark-thriftserver" - - def pre_upgrade_restart(self, env, upgrade_type=None): import params env.set_params(params) if params.version and compare_versions(format_stack_version(params.version), '4.0.0.0') >= 0: conf_select.select(params.stack_name, "spark", params.version) - stack_select.select("spark-thriftserver", params.version) + stack_select.select_packages(params.version) def install(self, env): self.install_packages(env) http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/SQOOP/package/scripts/service_check.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/SQOOP/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/SQOOP/package/scripts/service_check.py index b1f658d..211c917 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/SQOOP/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/SQOOP/package/scripts/service_check.py @@ -24,9 +24,6 @@ from resource_management import * class SqoopServiceCheck(Script): - def get_component_name(self): - return "sqoop-server" - def service_check(self, env): import params env.set_params(params) http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/SQOOP/package/scripts/sqoop_client.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/SQOOP/package/scripts/sqoop_client.py b/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/SQOOP/package/scripts/sqoop_client.py index 56b7135..5e48aca 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/SQOOP/package/scripts/sqoop_client.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/SQOOP/package/scripts/sqoop_client.py @@ -29,16 +29,13 @@ from sqoop import sqoop class SqoopClient(Script): - def get_component_name(self): - return "sqoop-client" - def pre_rolling_restart(self, env): import params env.set_params(params) if params.version and compare_versions(format_stack_version(params.version), '4.0.0.0') >= 0: conf_select.select(params.stack_name, "sqoop", params.version) - stack_select.select("sqoop-client", params.version) + stack_select.select_packages(params.version) #Execute(format("stack-select set sqoop-client {version}")) def install(self, env): http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/YARN/package/scripts/application_timeline_server.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/YARN/package/scripts/application_timeline_server.py b/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/YARN/package/scripts/application_timeline_server.py index 5152cf9..125a65f 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/YARN/package/scripts/application_timeline_server.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/YARN/package/scripts/application_timeline_server.py @@ -33,9 +33,6 @@ from service import service class ApplicationTimelineServer(Script): - def get_component_name(self): - return "hadoop-yarn-timelineserver" - def install(self, env): self.install_packages(env) #self.configure(env) @@ -52,7 +49,7 @@ class ApplicationTimelineServer(Script): if params.version and compare_versions(format_stack_version(params.version), '4.0.0.0') >= 0: conf_select.select(params.stack_name, "hadoop", params.version) - stack_select.select("hadoop-yarn-timelineserver", params.version) + stack_select.select_packages(params.version) #Execute(format("stack-select set hadoop-yarn-timelineserver {version}")) def start(self, env, upgrade_type=None): http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/YARN/package/scripts/historyserver.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/YARN/package/scripts/historyserver.py b/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/YARN/package/scripts/historyserver.py index 20635a2..d887fce 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/YARN/package/scripts/historyserver.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/YARN/package/scripts/historyserver.py @@ -41,9 +41,6 @@ from ambari_commons.os_family_impl import OsFamilyImpl class HistoryServer(Script): - def get_component_name(self): - return "hadoop-mapreduce-historyserver" - def install(self, env): self.install_packages(env) @@ -59,7 +56,7 @@ class HistoryServer(Script): if params.version and compare_versions(format_stack_version(params.version), '4.0.0.0') >= 0: conf_select.select(params.stack_name, "hadoop", params.version) - stack_select.select("hadoop-mapreduce-historyserver", params.version) + stack_select.select_packages(params.version) # MC Hammer said, "Can't touch this" copy_to_hdfs("mapreduce", params.user_group, params.hdfs_user, skip=params.host_sys_prepped) copy_to_hdfs("slider", params.user_group, params.hdfs_user, skip=params.host_sys_prepped) http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/YARN/package/scripts/mapreduce2_client.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/YARN/package/scripts/mapreduce2_client.py b/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/YARN/package/scripts/mapreduce2_client.py index 77fd49e..fe64193 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/YARN/package/scripts/mapreduce2_client.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/YARN/package/scripts/mapreduce2_client.py @@ -28,16 +28,13 @@ from yarn import yarn class MapReduce2Client(Script): - def get_component_name(self): - return "hadoop-client" - def pre_upgrade_restart(self, env, upgrade_type=None): import params env.set_params(params) if params.version and compare_versions(format_stack_version(params.version), '4.0.0.0') >= 0: conf_select.select(params.stack_name, "hadoop", params.version) - stack_select.select("hadoop-client", params.version) + stack_select.select_packages(params.version) #Execute(format("stack-select set hadoop-client {version}")) def install(self, env): http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/YARN/package/scripts/nodemanager.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/YARN/package/scripts/nodemanager.py b/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/YARN/package/scripts/nodemanager.py index d185b7e..c048127 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/YARN/package/scripts/nodemanager.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/YARN/package/scripts/nodemanager.py @@ -35,9 +35,6 @@ from service import service class Nodemanager(Script): - def get_component_name(self): - return "hadoop-yarn-nodemanager" - def install(self, env): self.install_packages(env) @@ -53,7 +50,7 @@ class Nodemanager(Script): if params.version and compare_versions(format_stack_version(params.version), '4.0.0.0') >= 0: conf_select.select(params.stack_name, "hadoop", params.version) - stack_select.select("hadoop-yarn-nodemanager", params.version) + stack_select.select_packages(params.version) #Execute(format("stack-select set hadoop-yarn-nodemanager {version}")) def start(self, env, upgrade_type=None): http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/YARN/package/scripts/resourcemanager.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/YARN/package/scripts/resourcemanager.py b/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/YARN/package/scripts/resourcemanager.py index 8e350b9..554c23d 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/YARN/package/scripts/resourcemanager.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/YARN/package/scripts/resourcemanager.py @@ -33,9 +33,6 @@ from service import service class Resourcemanager(Script): - def get_component_name(self): - return "hadoop-yarn-resourcemanager" - def install(self, env): self.install_packages(env) @@ -52,7 +49,7 @@ class Resourcemanager(Script): if params.version and compare_versions(format_stack_version(params.version), '4.0.0.0') >= 0: conf_select.select(params.stack_name, "hadoop", params.version) - stack_select.select("hadoop-yarn-resourcemanager", params.version) + stack_select.select_packages(params.version) #Execute(format("stack-select set hadoop-yarn-resourcemanager {version}")) def start(self, env, upgrade_type=None): http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/YARN/package/scripts/yarn_client.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/YARN/package/scripts/yarn_client.py b/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/YARN/package/scripts/yarn_client.py index 0af5ccb..1f139bf 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/YARN/package/scripts/yarn_client.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/YARN/package/scripts/yarn_client.py @@ -40,16 +40,13 @@ class YarnClient(Script): def status(self, env): raise ClientComponentHasNoStatus() - def get_component_name(self): - return "hadoop-client" - def pre_upgrade_restart(self, env, upgrade_type=None): import params env.set_params(params) if params.version and compare_versions(format_stack_version(params.version), '4.0.0.0') >= 0: conf_select.select(params.stack_name, "hadoop", params.version) - stack_select.select("hadoop-client", params.version) + stack_select.select_packages(params.version) #Execute(format("stack-select set hadoop-client {version}")) if __name__ == "__main__": http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/ZOOKEEPER/package/scripts/zookeeper.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/ZOOKEEPER/package/scripts/zookeeper.py b/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/ZOOKEEPER/package/scripts/zookeeper.py index d861f6f..0cb62bf 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/ZOOKEEPER/package/scripts/zookeeper.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/ZOOKEEPER/package/scripts/zookeeper.py @@ -74,7 +74,7 @@ def zookeeper(type = None, upgrade_type=None): # This path may be missing after Ambari upgrade. We need to create it. if (upgrade_type == "rolling") and (not os.path.exists("/usr/iop/current/zookeeper-server")) and params.current_version: conf_select(params.stack_name, "zookeeper", params.current_version) - stack_select.select("zookeeper-server", params.version) + stack_select.select_packages(params.version) #Execute(format("stack-select set zookeeper-server {version}")) if (params.log4j_props != None): http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/ZOOKEEPER/package/scripts/zookeeper_client.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/ZOOKEEPER/package/scripts/zookeeper_client.py b/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/ZOOKEEPER/package/scripts/zookeeper_client.py index 80ca08a..63e1df8 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/ZOOKEEPER/package/scripts/zookeeper_client.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/ZOOKEEPER/package/scripts/zookeeper_client.py @@ -30,9 +30,6 @@ from zookeeper import zookeeper class ZookeeperClient(Script): - def get_component_name(self): - return "zookeeper-client" - def install(self, env): self.install_packages(env) self.configure(env) @@ -50,7 +47,7 @@ class ZookeeperClient(Script): if params.version and compare_versions(format_stack_version(params.version), '4.0.0.0') >= 0: conf_select.select(params.stack_name, "zookeeper", params.version) - stack_select.select("zookeeper-client", params.version) + stack_select.select_packages(params.version) #Execute(format("stack-select set zookeeper-client {version}")) def start(self, env, upgrade_type=None): http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/ZOOKEEPER/package/scripts/zookeeper_server.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/ZOOKEEPER/package/scripts/zookeeper_server.py b/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/ZOOKEEPER/package/scripts/zookeeper_server.py index ccba9ce..727622a 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/ZOOKEEPER/package/scripts/zookeeper_server.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.0/services/ZOOKEEPER/package/scripts/zookeeper_server.py @@ -40,9 +40,6 @@ from zookeeper_service import zookeeper_service class ZookeeperServer(Script): - def get_component_name(self): - return "zookeeper-server" - def install(self, env): self.install_packages(env) self.configure(env) @@ -59,7 +56,7 @@ class ZookeeperServer(Script): if params.version and compare_versions(format_stack_version(params.version), '4.0.0.0') >= 0: conf_select.select(params.stack_name, "zookeeper", params.version) - stack_select.select("zookeeper-server", params.version) + stack_select.select_packages(params.version) #Execute(format("stack-select set zookeeper-server {version}")) def start(self, env, upgrade_type=None): http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/hooks/after-INSTALL/scripts/shared_initialization.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/hooks/after-INSTALL/scripts/shared_initialization.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/hooks/after-INSTALL/scripts/shared_initialization.py index d306066..1324c8c 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/hooks/after-INSTALL/scripts/shared_initialization.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/hooks/after-INSTALL/scripts/shared_initialization.py @@ -43,10 +43,21 @@ def setup_stack_symlinks(): # which would only be during an intial cluster installation version = params.current_version if params.current_version is not None else params.stack_version_unformatted - if not params.upgrade_suspended: - # On parallel command execution this should be executed by a single process at a time. - with FcntlBasedProcessLock(params.stack_select_lock_file, enabled = params.is_parallel_execution_enabled, skip_fcntl_failures = True): - stack_select.select_all(version) + if params.upgrade_suspended: + Logger.warning( + "Skipping running stack-selector-tool for stack {0} because there is a suspended upgrade") + return + + # get the packages which the stack-select tool should be used on + stack_select_packages = stack_select.get_packages(stack_select.PACKAGE_SCOPE_INSTALL) + if stack_select_packages is None: + return + + # On parallel command execution this should be executed by a single process at a time. + with FcntlBasedProcessLock(params.stack_select_lock_file, enabled = params.is_parallel_execution_enabled, skip_fcntl_failures = True): + for package in stack_select_packages: + stack_select.select(package, version) + def setup_config(): import params http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/services/HBASE/package/scripts/hbase_client.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/services/HBASE/package/scripts/hbase_client.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/services/HBASE/package/scripts/hbase_client.py index f18a96a..1c3f113 100644 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/services/HBASE/package/scripts/hbase_client.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/services/HBASE/package/scripts/hbase_client.py @@ -52,20 +52,16 @@ class HbaseClientWindows(HbaseClient): @OsFamilyImpl(os_family=OsFamilyImpl.DEFAULT) class HbaseClientDefault(HbaseClient): - def get_component_name(self): - return "hbase-client" - def pre_upgrade_restart(self, env, upgrade_type=None): import params env.set_params(params) if params.version and check_stack_feature(StackFeature.ROLLING_UPGRADE, params.version): conf_select.select(params.stack_name, "hbase", params.version) - stack_select.select("hbase-client", params.version) # phoenix may not always be deployed try: - stack_select.select("phoenix-client", params.version) + stack_select.select_packages(params.version) except Exception as e: print "Ignoring error due to missing phoenix-client" print str(e) @@ -75,7 +71,7 @@ class HbaseClientDefault(HbaseClient): # of the final "CLIENTS" group and we need to ensure that hadoop-client # is also set conf_select.select(params.stack_name, "hadoop", params.version) - stack_select.select("hadoop-client", params.version) + stack_select.select_packages(params.version) if __name__ == "__main__": http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/services/HBASE/package/scripts/hbase_master.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/services/HBASE/package/scripts/hbase_master.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/services/HBASE/package/scripts/hbase_master.py index ae0e0d9..461eab5 100644 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/services/HBASE/package/scripts/hbase_master.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/services/HBASE/package/scripts/hbase_master.py @@ -76,13 +76,10 @@ class HbaseMasterWindows(HbaseMaster): @OsFamilyImpl(os_family=OsFamilyImpl.DEFAULT) class HbaseMasterDefault(HbaseMaster): - def get_component_name(self): - return "hbase-master" - def pre_upgrade_restart(self, env, upgrade_type=None): import params env.set_params(params) - upgrade.prestart(env, "hbase-master") + upgrade.prestart(env) def start(self, env, upgrade_type=None): import params http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/services/HBASE/package/scripts/hbase_regionserver.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/services/HBASE/package/scripts/hbase_regionserver.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/services/HBASE/package/scripts/hbase_regionserver.py index 370167b..bd11fa0 100644 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/services/HBASE/package/scripts/hbase_regionserver.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/services/HBASE/package/scripts/hbase_regionserver.py @@ -70,13 +70,10 @@ class HbaseRegionServerWindows(HbaseRegionServer): @OsFamilyImpl(os_family=OsFamilyImpl.DEFAULT) class HbaseRegionServerDefault(HbaseRegionServer): - def get_component_name(self): - return "hbase-regionserver" - def pre_upgrade_restart(self, env, upgrade_type=None): import params env.set_params(params) - upgrade.prestart(env, "hbase-regionserver") + upgrade.prestart(env) def post_upgrade_restart(self, env, upgrade_type=None): import params http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/services/HBASE/package/scripts/hbase_restgatewayserver.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/services/HBASE/package/scripts/hbase_restgatewayserver.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/services/HBASE/package/scripts/hbase_restgatewayserver.py index 1d028d6..23900f4 100644 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/services/HBASE/package/scripts/hbase_restgatewayserver.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/services/HBASE/package/scripts/hbase_restgatewayserver.py @@ -27,9 +27,6 @@ from hbase_decommission import hbase_decommission import upgrade class HbaseRestGatewayServer(Script): - def get_component_name(self): - return "hbase-restserver" - def install(self, env): self.install_packages(env) @@ -42,7 +39,7 @@ class HbaseRestGatewayServer(Script): def pre_upgrade_restart(self, env, upgrade_type=None): import params env.set_params(params) - upgrade.prestart(env, "hbase-restserver") + upgrade.prestart(env) def post_upgrade_restart(self, env, upgrade_type=None): import params http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/services/HBASE/package/scripts/phoenix_queryserver.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/services/HBASE/package/scripts/phoenix_queryserver.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/services/HBASE/package/scripts/phoenix_queryserver.py index 82113e9..1621916 100644 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/services/HBASE/package/scripts/phoenix_queryserver.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/services/HBASE/package/scripts/phoenix_queryserver.py @@ -34,10 +34,6 @@ class PhoenixQueryServer(Script): self.install_packages(env) - def get_component_name(self): - return "phoenix-server" - - def configure(self, env): import params env.set_params(params) @@ -64,7 +60,7 @@ class PhoenixQueryServer(Script): if params.stack_version_formatted and check_stack_feature(StackFeature.PHOENIX, params.stack_version_formatted): # phoenix uses hbase configs conf_select.select(params.stack_name, "hbase", params.version) - stack_select.select("phoenix-server", params.version) + stack_select.select_packages(params.version) def status(self, env): http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/services/HBASE/package/scripts/upgrade.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/services/HBASE/package/scripts/upgrade.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/services/HBASE/package/scripts/upgrade.py index b1a19e6..dbeb55d 100644 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/services/HBASE/package/scripts/upgrade.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2.5/services/HBASE/package/scripts/upgrade.py @@ -27,12 +27,12 @@ from resource_management.libraries.functions.stack_features import check_stack_f from resource_management.libraries.functions.decorator import retry from resource_management.libraries.functions import check_process_status -def prestart(env, stack_component): +def prestart(env): import params if params.version and check_stack_feature(StackFeature.ROLLING_UPGRADE, params.version): conf_select.select(params.stack_name, "hbase", params.version) - stack_select.select(stack_component, params.version) + stack_select.select_packages(params.version) def post_regionserver(env): import params http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/FLUME/package/scripts/flume_handler.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/FLUME/package/scripts/flume_handler.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/FLUME/package/scripts/flume_handler.py index 22f4b29..d70d06a 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/FLUME/package/scripts/flume_handler.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/FLUME/package/scripts/flume_handler.py @@ -34,9 +34,6 @@ from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl class FlumeHandler(Script): - def get_component_name(self): - return "flume-server" - def install(self, env): import params self.install_packages(env) @@ -137,7 +134,7 @@ class FlumeHandler(Script): Logger.info("Executing Flume Stack Upgrade pre-restart") conf_select.select(params.stack_name, "flume", params.version) - stack_select.select("flume-server", params.version) + stack_select.select_packages(params.version) if params.upgrade_direction == Direction.UPGRADE: flume_upgrade.pre_start_restore() http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HBASE/package/scripts/hbase_client.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HBASE/package/scripts/hbase_client.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HBASE/package/scripts/hbase_client.py index ba53462..2b83664 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HBASE/package/scripts/hbase_client.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HBASE/package/scripts/hbase_client.py @@ -28,21 +28,17 @@ from hbase import hbase class HbaseClient(Script): - def get_component_name(self): - return "hbase-client" - def pre_upgrade_restart(self, env, upgrade_type=None): import params env.set_params(params) if params.version and compare_versions(format_stack_version(params.version), '4.0.0.0') >= 0: conf_select.select(params.stack_name, "hbase", params.version) - stack_select.select("hbase-client", params.version) #Execute(format("iop-select set hbase-client {version}")) # phoenix may not always be deployed try: - stack_select.select("phoenix-client", params.version) + stack_select.select_packages(params.version) except Exception as e: print "Ignoring error due to missing phoenix-client" print str(e) @@ -51,7 +47,6 @@ class HbaseClient(Script): # of the final "CLIENTS" group and we need to ensure that hadoop-client # is also set conf_select.select(params.stack_name, "hadoop", params.version) - stack_select.select("hadoop-client", params.version) #Execute(format("iop-select set hadoop-client {version}")) def install(self, env): http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HBASE/package/scripts/hbase_master.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HBASE/package/scripts/hbase_master.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HBASE/package/scripts/hbase_master.py index ccca90c..23643e7 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HBASE/package/scripts/hbase_master.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HBASE/package/scripts/hbase_master.py @@ -31,9 +31,6 @@ from setup_ranger_hbase import setup_ranger_hbase class HbaseMaster(Script): - def get_component_name(self): - return "hbase-master" - def install(self, env): self.install_packages(env) @@ -46,7 +43,7 @@ class HbaseMaster(Script): def pre_upgrade_restart(self, env, upgrade_type=None): import params env.set_params(params) - upgrade.prestart(env, "hbase-master") + upgrade.prestart(env) def start(self, env, upgrade_type=None): import params http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HBASE/package/scripts/hbase_regionserver.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HBASE/package/scripts/hbase_regionserver.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HBASE/package/scripts/hbase_regionserver.py index d9bf76c..b92a29a 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HBASE/package/scripts/hbase_regionserver.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HBASE/package/scripts/hbase_regionserver.py @@ -30,9 +30,6 @@ from setup_ranger_hbase import setup_ranger_hbase class HbaseRegionServer(Script): - def get_component_name(self): - return "hbase-regionserver" - def install(self, env): self.install_packages(env) @@ -45,7 +42,7 @@ class HbaseRegionServer(Script): def pre_upgrade_restart(self, env, upgrade_type=None): import params env.set_params(params) - upgrade.prestart(env, "hbase-regionserver") + upgrade.prestart(env) def post_upgrade_restart(self, env, upgrade_type=None): import params http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HBASE/package/scripts/hbase_restgatewayserver.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HBASE/package/scripts/hbase_restgatewayserver.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HBASE/package/scripts/hbase_restgatewayserver.py index c7e0cc4..23900f4 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HBASE/package/scripts/hbase_restgatewayserver.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HBASE/package/scripts/hbase_restgatewayserver.py @@ -27,9 +27,6 @@ from hbase_decommission import hbase_decommission import upgrade class HbaseRestGatewayServer(Script): - def get_component_name(self): - return "hbase-restserver" - def install(self, env): self.install_packages(env) @@ -42,7 +39,7 @@ class HbaseRestGatewayServer(Script): def pre_upgrade_restart(self, env, upgrade_type=None): import params env.set_params(params) - upgrade.prestart(env, "hbase-restserver") + upgrade.prestart(env) def post_upgrade_restart(self, env, upgrade_type=None): import params http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HBASE/package/scripts/phoenix_queryserver.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HBASE/package/scripts/phoenix_queryserver.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HBASE/package/scripts/phoenix_queryserver.py index 88d5f58..51b8c65 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HBASE/package/scripts/phoenix_queryserver.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HBASE/package/scripts/phoenix_queryserver.py @@ -30,11 +30,6 @@ class PhoenixQueryServer(Script): import params self.install_packages(env) - - def get_component_name(self): - return "phoenix-server" - - def configure(self, env): import params env.set_params(params) @@ -61,7 +56,7 @@ class PhoenixQueryServer(Script): if Script.is_stack_greater_or_equal("4.2"): # phoenix uses hbase configs conf_select.select(params.stack_name, "hbase", params.version) - stack_select.select("phoenix-server", params.version) + stack_select.select_packages(params.version) def status(self, env): http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HBASE/package/scripts/upgrade.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HBASE/package/scripts/upgrade.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HBASE/package/scripts/upgrade.py index 11b770d..f1024c5 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HBASE/package/scripts/upgrade.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HBASE/package/scripts/upgrade.py @@ -26,12 +26,12 @@ from resource_management.libraries.functions import stack_select from resource_management.libraries.functions.version import compare_versions, format_stack_version from resource_management.libraries.functions.decorator import retry -def prestart(env, component): +def prestart(env): import params if params.version and compare_versions(format_stack_version(params.version), '4.0.0.0') >= 0: conf_select.select(params.stack_name, "hbase", params.version) - stack_select.select(component, params.version) + stack_select.select_packages(params.version) def post_regionserver(env): import params http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HDFS/package/scripts/datanode.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HDFS/package/scripts/datanode.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HDFS/package/scripts/datanode.py index a58db09..7f38a78 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HDFS/package/scripts/datanode.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HDFS/package/scripts/datanode.py @@ -34,7 +34,7 @@ class DataNode(Script): Get the name or path to the hdfs binary depending on the stack and version. """ import params - stack_to_comp = self.get_component_name() + stack_to_comp = stack_select.get_package_name() if params.stack_name in stack_to_comp: return get_hdfs_binary(stack_to_comp[params.stack_name]) return "hdfs" @@ -74,16 +74,13 @@ class DataNode(Script): env.set_params(status_params) check_process_status(status_params.datanode_pid_file) - def get_component_name(self): - return "hadoop-hdfs-datanode" - def pre_upgrade_restart(self, env, upgrade_type=None): Logger.info("Executing DataNode Stack Upgrade pre-restart") import params env.set_params(params) if params.version and compare_versions(format_stack_version(params.version), '4.0.0.0') >= 0: conf_select.select(params.stack_name, "hadoop", params.version) - stack_select.select("hadoop-hdfs-datanode", params.version) + stack_select.select_packages(params.version) #Execute(format("iop-select set hadoop-hdfs-datanode {version}")) http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HDFS/package/scripts/hdfs_client.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HDFS/package/scripts/hdfs_client.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HDFS/package/scripts/hdfs_client.py index 17b64f0..62c6dd0 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HDFS/package/scripts/hdfs_client.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HDFS/package/scripts/hdfs_client.py @@ -29,9 +29,6 @@ from utils import service class HdfsClient(Script): - def get_component_name(self): - return "hadoop-client" - def install(self, env): import params @@ -44,7 +41,7 @@ class HdfsClient(Script): env.set_params(params) if params.version and compare_versions(format_stack_version(params.version), '4.0.0.0') >= 0: conf_select.select(params.stack_name, "hadoop", params.version) - stack_select.select("hadoop-client", params.version) + stack_select.select_packages(params.version) def start(self, env, upgrade_type=None): import params http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HDFS/package/scripts/journalnode.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HDFS/package/scripts/journalnode.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HDFS/package/scripts/journalnode.py index 8a7f572..3f44de0 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HDFS/package/scripts/journalnode.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HDFS/package/scripts/journalnode.py @@ -34,9 +34,6 @@ import journalnode_upgrade class JournalNode(Script): - def get_component_name(self): - return "hadoop-hdfs-journalnode" - def install(self, env): import params @@ -50,7 +47,7 @@ class JournalNode(Script): if params.version and compare_versions(format_stack_version(params.version), '4.0.0.0') >= 0: conf_select.select(params.stack_name, "hadoop", params.version) - stack_select.select("hadoop-hdfs-journalnode", params.version) + stack_select.select_packages(params.version) #Execute(format("iop-select set hadoop-hdfs-journalnode {version}")) def start(self, env, upgrade_type=None): http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HDFS/package/scripts/namenode.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HDFS/package/scripts/namenode.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HDFS/package/scripts/namenode.py index 4ff4a4b..280aeee 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HDFS/package/scripts/namenode.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HDFS/package/scripts/namenode.py @@ -58,15 +58,12 @@ except ImportError: class NameNode(Script): - def get_component_name(self): - return "hadoop-hdfs-namenode" - def get_hdfs_binary(self): """ Get the name or path to the hdfs binary depending on the stack and version. """ import params - stack_to_comp = self.get_component_name() + stack_to_comp = stack_select.get_package_name() if params.stack_name in stack_to_comp: return get_hdfs_binary(stack_to_comp[params.stack_name]) return "hdfs" @@ -100,7 +97,7 @@ class NameNode(Script): if params.version and compare_versions(format_stack_version(params.version), '4.0.0.0') >= 0: conf_select.select(params.stack_name, "hadoop", params.version) - stack_select.select("hadoop-hdfs-namenode", params.version) + stack_select.select_packages(params.version) #Execute(format("iop-select set hadoop-hdfs-namenode {version}")) def start(self, env, upgrade_type=None): http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HDFS/package/scripts/nfsgateway.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HDFS/package/scripts/nfsgateway.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HDFS/package/scripts/nfsgateway.py index 9e7bfb1..b105d69 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HDFS/package/scripts/nfsgateway.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HDFS/package/scripts/nfsgateway.py @@ -30,9 +30,6 @@ from resource_management.libraries.functions.version import compare_versions, fo class NFSGateway(Script): - def get_component_name(self): - return "hadoop-hdfs-nfs3" - def install(self, env): import params @@ -46,7 +43,7 @@ class NFSGateway(Script): if Script.is_stack_greater_or_equal('4.1.0.0'): conf_select.select(params.stack_name, "hadoop", params.version) - stack_select.select("hadoop-hdfs-nfs3", params.version) + stack_select.select_packages(params.version) def start(self, env, upgrade_type=None): import params http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HDFS/package/scripts/snamenode.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HDFS/package/scripts/snamenode.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HDFS/package/scripts/snamenode.py index 6bd73cc..6a7fd43 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HDFS/package/scripts/snamenode.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HDFS/package/scripts/snamenode.py @@ -31,9 +31,6 @@ from hdfs import hdfs class SNameNode(Script): - def get_component_name(self): - return "hadoop-hdfs-secondarynamenode" - def install(self, env): import params @@ -48,7 +45,7 @@ class SNameNode(Script): if params.version and compare_versions(format_stack_version(params.version), '4.0.0.0') >= 0: conf_select.select(params.stack_name, "hadoop", params.version) - stack_select.select("hadoop-hdfs-secondarynamenode", params.version) + stack_select.select_packages(params.version) def start(self, env, upgrade_type=None): import params http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HIVE/package/scripts/hcat_client.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HIVE/package/scripts/hcat_client.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HIVE/package/scripts/hcat_client.py index e914cf6..8ae64b9 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HIVE/package/scripts/hcat_client.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HIVE/package/scripts/hcat_client.py @@ -42,9 +42,7 @@ class HCatClient(Script): @OsFamilyImpl(os_family=OsFamilyImpl.DEFAULT) class HCatClientDefault(HCatClient): - def get_component_name(self): - return "hadoop-client" - + pass if __name__ == "__main__": HCatClient().execute() http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HIVE/package/scripts/hive_client.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HIVE/package/scripts/hive_client.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HIVE/package/scripts/hive_client.py index c5d821b..14a5f83 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HIVE/package/scripts/hive_client.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HIVE/package/scripts/hive_client.py @@ -42,9 +42,6 @@ class HiveClient(Script): @OsFamilyImpl(os_family=OsFamilyImpl.DEFAULT) class HiveClientDefault(HiveClient): - def get_component_name(self): - return "hadoop-client" - def pre_upgrade_restart(self, env, upgrade_type=None): Logger.info("Executing Hive client Stack Upgrade pre-restart") @@ -54,7 +51,7 @@ class HiveClientDefault(HiveClient): if params.version and compare_versions(format_stack_version(params.version), '4.1.0.0') >= 0: conf_select.select(params.stack_name, "hive", params.version) conf_select.select(params.stack_name, "hadoop", params.version) - stack_select.select("hadoop-client", params.version) + stack_select.select_packages(params.version) def pre_upgrade_restart(self, env, upgrade_type=None): """ @@ -77,7 +74,7 @@ class HiveClientDefault(HiveClient): # HCat client doesn't have a first-class entry in hdp-select. Since clients always # update after daemons, this ensures that the hcat directories are correct on hosts # which do not include the WebHCat daemon - stack_select.select("hive-webhcat", params.version) + stack_select.select_packages(params.version) if __name__ == "__main__": HiveClient().execute() http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HIVE/package/scripts/hive_metastore.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HIVE/package/scripts/hive_metastore.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HIVE/package/scripts/hive_metastore.py index 268db10..0a651f9 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HIVE/package/scripts/hive_metastore.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HIVE/package/scripts/hive_metastore.py @@ -73,9 +73,6 @@ class HiveMetastore(Script): @OsFamilyImpl(os_family=OsFamilyImpl.DEFAULT) class HiveMetastoreDefault(HiveMetastore): - def get_component_name(self): - return "hive-metastore" - def status(self, env): import status_params from resource_management.libraries.functions import check_process_status @@ -100,7 +97,7 @@ class HiveMetastoreDefault(HiveMetastore): if params.version and compare_versions(format_stack_version(params.version), '4.0.0.0') >= 0: conf_select.select(params.stack_name, "hive", params.version) - stack_select.select("hive-metastore", params.version) + stack_select.select_packages(params.version) def security_status(self, env): http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HIVE/package/scripts/hive_server.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HIVE/package/scripts/hive_server.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HIVE/package/scripts/hive_server.py index eb2be94..79e4c73 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HIVE/package/scripts/hive_server.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HIVE/package/scripts/hive_server.py @@ -56,9 +56,6 @@ class HiveServer(Script): @OsFamilyImpl(os_family=OsFamilyImpl.DEFAULT) class HiveServerDefault(HiveServer): - def get_component_name(self): - return "hive-server2" - def start(self, env, upgrade_type=None): import params env.set_params(params) @@ -99,7 +96,7 @@ class HiveServerDefault(HiveServer): if params.version and compare_versions(format_stack_version(params.version), '4.0.0.0') >= 0: conf_select.select(params.stack_name, "hive", params.version) - stack_select.select("hive-server2", params.version) + stack_select.select_packages(params.version) # Copy mapreduce.tar.gz and tez.tar.gz to HDFS resource_created = copy_to_hdfs( http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HIVE/package/scripts/webhcat_server.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HIVE/package/scripts/webhcat_server.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HIVE/package/scripts/webhcat_server.py index 72772c9..9f1596b 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HIVE/package/scripts/webhcat_server.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/HIVE/package/scripts/webhcat_server.py @@ -54,9 +54,6 @@ class WebHCatServer(Script): @OsFamilyImpl(os_family=OsFamilyImpl.DEFAULT) class WebHCatServerDefault(WebHCatServer): - def get_component_name(self): - return "hive-webhcat" - def status(self, env): import status_params env.set_params(status_params) @@ -71,7 +68,7 @@ class WebHCatServerDefault(WebHCatServer): # webhcat has no conf, but uses hadoop home, so verify that regular hadoop conf is set conf_select.select(params.stack_name, "hive-hcatalog", params.version) conf_select.select(params.stack_name, "hadoop", params.version) - stack_select.select("hive-webhcat", params.version) + stack_select.select_packages(params.version) def security_status(self, env): import status_params http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/KAFKA/package/scripts/kafka_broker.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/KAFKA/package/scripts/kafka_broker.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/KAFKA/package/scripts/kafka_broker.py index a21acd1..cf08b9b 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/KAFKA/package/scripts/kafka_broker.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/KAFKA/package/scripts/kafka_broker.py @@ -33,9 +33,6 @@ from kafka import kafka class KafkaBroker(Script): - def get_component_name(self): - return "kafka-broker" - def install(self, env): self.install_packages(env) @@ -49,7 +46,7 @@ class KafkaBroker(Script): env.set_params(params) if params.version and compare_versions(format_stack_version(params.version), '4.1.0.0') >= 0: - stack_select.select("kafka-broker", params.version) + stack_select.select_packages(params.version) if params.version and compare_versions(format_stack_version(params.version), '4.1.0.0') >= 0: conf_select.select(params.stack_name, "kafka", params.version) http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/KNOX/package/scripts/knox_gateway.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/KNOX/package/scripts/knox_gateway.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/KNOX/package/scripts/knox_gateway.py index d5821e8..2b3a103 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/KNOX/package/scripts/knox_gateway.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/KNOX/package/scripts/knox_gateway.py @@ -44,11 +44,6 @@ from knox_ldap import ldap from setup_ranger_knox import setup_ranger_knox class KnoxGateway(Script): - - - def get_component_name(self): - return "knox-server" - def install(self, env): self.install_packages(env) import params @@ -118,7 +113,7 @@ class KnoxGateway(Script): # conf-select will change the symlink to the conf folder. conf_select.select(params.stack_name, "knox", params.version) # hdp_select.select("knox-server", params.version) - stack_select.select("knox-server", params.version) + stack_select.select_packages(params.version) # Extract the tar of the old conf folder into the new conf directory if absolute_backup_dir is not None and params.upgrade_direction and params.upgrade_direction == Direction.UPGRADE: http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/OOZIE/package/scripts/oozie_client.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/OOZIE/package/scripts/oozie_client.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/OOZIE/package/scripts/oozie_client.py index de30091..8f4577e 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/OOZIE/package/scripts/oozie_client.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/OOZIE/package/scripts/oozie_client.py @@ -29,9 +29,6 @@ from oozie_service import oozie_service class OozieClient(Script): - def get_component_name(self): - return "oozie-client" - def install(self, env): self.install_packages(env) self.configure(env) @@ -58,7 +55,7 @@ class OozieClient(Script): Logger.info("Executing Oozie Client Rolling Upgrade pre-restart") conf_select.select(params.stack_name, "oozie", params.version) - stack_select.select("oozie-client", params.version) + stack_select.select_packages(params.version) #Execute(format("iop-select set oozie-client {version}")) # We substitute some configs (oozie.authentication.kerberos.principal) before generation (see oozie.py and params.py). http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/OOZIE/package/scripts/oozie_server.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/OOZIE/package/scripts/oozie_server.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/OOZIE/package/scripts/oozie_server.py index 52e0de1..c2e1af5 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/OOZIE/package/scripts/oozie_server.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/OOZIE/package/scripts/oozie_server.py @@ -42,9 +42,6 @@ from oozie_service import oozie_service class OozieServer(Script): - def get_component_name(self): - return "oozie-server" - def install(self, env): self.install_packages(env) @@ -61,10 +58,9 @@ class OozieServer(Script): # This is required as both need to be pointing to new installed oozie version. # Sets the symlink : eg: /usr/hdp/current/oozie-client -> /usr/hdp/2.3.x.y-<version>/oozie - stack_select.select("oozie-client", params.version) # Sets the symlink : eg: /usr/hdp/current/oozie-server -> /usr/hdp/2.3.x.y-<version>/oozie - stack_select.select("oozie-server", params.version) - + stack_select.select_packages(params.version) + env.set_params(params) oozie(is_server=True) @@ -181,7 +177,7 @@ class OozieServer(Script): oozie_server_upgrade.backup_configuration() conf_select.select(params.stack_name, "oozie", params.version) - stack_select.select("oozie-server", params.version) + stack_select.select_packages(params.version) #Execute(format("iop-select set oozie-server {version}")) oozie_server_upgrade.restore_configuration() http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/PIG/package/scripts/pig_client.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/PIG/package/scripts/pig_client.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/PIG/package/scripts/pig_client.py index bd08b56..96a48c1 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/PIG/package/scripts/pig_client.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/PIG/package/scripts/pig_client.py @@ -39,9 +39,6 @@ class PigClient(Script): @OsFamilyImpl(os_family=OsFamilyImpl.DEFAULT) class PigClientLinux(PigClient): - def get_component_name(self): - return "hadoop-client" - def pre_upgrade_restart(self, env, upgrade_type=None): import params env.set_params(params) @@ -49,7 +46,7 @@ class PigClientLinux(PigClient): if params.version and compare_versions(format_stack_version(params.version), '4.0.0.0') >= 0: conf_select.select(params.stack_name, "pig", params.version) conf_select.select(params.stack_name, "hadoop", params.version) - stack_select.select("hadoop-client", params.version) # includes pig-client + stack_select.select_packages(params.version) def install(self, env): self.install_packages(env) http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/RANGER/package/scripts/ranger_admin.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/RANGER/package/scripts/ranger_admin.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/RANGER/package/scripts/ranger_admin.py index b2d1c74..c34951b 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/RANGER/package/scripts/ranger_admin.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/RANGER/package/scripts/ranger_admin.py @@ -35,9 +35,6 @@ class RangerAdmin(Script): upgrade_marker_file = '/tmp/rangeradmin_ru.inprogress' - def get_component_name(self): - return "ranger-admin" - def install(self, env): self.install_packages(env) import params @@ -178,7 +175,7 @@ class RangerAdmin(Script): stack_name = upgrade_stack[0] stack_version = upgrade_stack[1] - stack_select.select("ranger-admin", stack_version) + stack_select.select_packages(params.version) conf_select.select(stack_name, "ranger-admin", stack_version) def get_log_folder(self): http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/RANGER/package/scripts/ranger_usersync.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/RANGER/package/scripts/ranger_usersync.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/RANGER/package/scripts/ranger_usersync.py index 7ccf12d..10eec12 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/RANGER/package/scripts/ranger_usersync.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/RANGER/package/scripts/ranger_usersync.py @@ -74,9 +74,5 @@ class RangerUsersync(Script): from setup_ranger_xml import ranger ranger('ranger_usersync', upgrade_type=upgrade_type) - def get_component_name(self): - return "ranger-usersync" - - if __name__ == "__main__": RangerUsersync().execute() http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/RANGER/package/scripts/upgrade.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/RANGER/package/scripts/upgrade.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/RANGER/package/scripts/upgrade.py index 098b5cf..75b1fbe 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/RANGER/package/scripts/upgrade.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/RANGER/package/scripts/upgrade.py @@ -27,4 +27,4 @@ def prestart(env, iop_component): import params conf_select.select(params.stack_name, iop_component, params.version) - stack_select.select(iop_component, params.version) + stack_select.select_packages(params.version) http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/RANGER_KMS/package/scripts/kms_server.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/RANGER_KMS/package/scripts/kms_server.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/RANGER_KMS/package/scripts/kms_server.py index f05124b..0239350 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/RANGER_KMS/package/scripts/kms_server.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/RANGER_KMS/package/scripts/kms_server.py @@ -30,9 +30,6 @@ import upgrade class KmsServer(Script): - def get_component_name(self): - return "ranger-kms" - def install(self, env): self.install_packages(env) import params http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/RANGER_KMS/package/scripts/upgrade.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/RANGER_KMS/package/scripts/upgrade.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/RANGER_KMS/package/scripts/upgrade.py index 3aed713..b37c295 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/RANGER_KMS/package/scripts/upgrade.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/RANGER_KMS/package/scripts/upgrade.py @@ -26,4 +26,4 @@ def prestart(env, iop_component): import params conf_select.select(params.stack_name, iop_component, params.version) - stack_select.select(iop_component, params.version) + stack_select.select_packages(params.version) http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SLIDER/package/scripts/slider_client.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SLIDER/package/scripts/slider_client.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SLIDER/package/scripts/slider_client.py index 92c67ff..33e2588 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SLIDER/package/scripts/slider_client.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SLIDER/package/scripts/slider_client.py @@ -31,23 +31,19 @@ class SliderClient(Script): @OsFamilyImpl(os_family=OsFamilyImpl.DEFAULT) class SliderClientLinux(SliderClient): - def get_component_name(self): - return "slider-client" - def pre_upgrade_restart(self, env, upgrade_type=None): import params env.set_params(params) if params.version and compare_versions(format_stack_version(params.version), '4.0.0.0') >= 0: conf_select.select(params.stack_name, "slider", params.version) - stack_select.select("slider-client", params.version) + stack_select.select_packages(params.version) #Execute(format("iop-select set slider-client {version}")) # also set all of the hadoop clients since slider client is upgraded as # part of the final "CLIENTS" group and we need to ensure that # hadoop-client is also set conf_select.select(params.stack_name, "hadoop", params.version) - stack_select.select("hadoop-client", params.version) #Execute(format("iop-select set hadoop-client {version}")) def install(self, env): http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SOLR/package/scripts/solr_server.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SOLR/package/scripts/solr_server.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SOLR/package/scripts/solr_server.py index 07b25a4..6b4454e 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SOLR/package/scripts/solr_server.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SOLR/package/scripts/solr_server.py @@ -39,7 +39,7 @@ class SolrServer(Script): import params env.set_params(params) if params.version and compare_versions(format_stack_version(params.version), '4.1.0.0') >= 0: - stack_select.select("solr-server", params.version) + stack_select.select_packages(params.version) conf_select.select(params.stack_name, "solr", params.version) def start(self, env, upgrade_type=None): http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SPARK/package/scripts/job_history_server.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SPARK/package/scripts/job_history_server.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SPARK/package/scripts/job_history_server.py index 2038369..50fef1a 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SPARK/package/scripts/job_history_server.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SPARK/package/scripts/job_history_server.py @@ -32,16 +32,13 @@ from spark import * class JobHistoryServer(Script): - def get_component_name(self): - return "spark-historyserver" - def pre_upgrade_restart(self, env, upgrade_type=None): import params env.set_params(params) if params.version and compare_versions(format_stack_version(params.version), '4.0.0.0') >= 0: conf_select.select(params.stack_name, "spark", params.version) - stack_select.select("spark-historyserver", params.version) + stack_select.select_packages(params.version) #Execute(format("iop-select set spark-historyserver {version}")) def install(self, env): http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SPARK/package/scripts/spark_client.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SPARK/package/scripts/spark_client.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SPARK/package/scripts/spark_client.py index 9ec8525..afd9238 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SPARK/package/scripts/spark_client.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SPARK/package/scripts/spark_client.py @@ -31,16 +31,13 @@ from spark import spark class SparkClient(Script): - def get_component_name(self): - return "spark-client" - def pre_upgrade_restart(self, env, upgrade_type=None): import params env.set_params(params) if params.version and compare_versions(format_stack_version(params.version), '4.0.0.0') >= 0: conf_select.select(params.stack_name, "spark", params.version) - stack_select.select("spark-client", params.version) + stack_select.select_packages(params.version) #Execute(format("iop-select set spark-client {version}")) def install(self, env): http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SPARK/package/scripts/spark_thrift_server.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SPARK/package/scripts/spark_thrift_server.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SPARK/package/scripts/spark_thrift_server.py index a0226b5..a680701 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SPARK/package/scripts/spark_thrift_server.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SPARK/package/scripts/spark_thrift_server.py @@ -33,17 +33,13 @@ from spark import * class ThriftServer(Script): - def get_component_name(self): - return "spark-thriftserver" - - def pre_upgrade_restart(self, env, upgrade_type=None): import params env.set_params(params) if params.version and compare_versions(format_stack_version(params.version), '4.0.0.0') >= 0: conf_select.select(params.stack_name, "spark", params.version) - stack_select.select("spark-thriftserver", params.version) + stack_select.select_packages(params.version) def install(self, env): self.install_packages(env) http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SQOOP/package/scripts/service_check.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SQOOP/package/scripts/service_check.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SQOOP/package/scripts/service_check.py index b1f658d..211c917 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SQOOP/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SQOOP/package/scripts/service_check.py @@ -24,9 +24,6 @@ from resource_management import * class SqoopServiceCheck(Script): - def get_component_name(self): - return "sqoop-server" - def service_check(self, env): import params env.set_params(params) http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SQOOP/package/scripts/sqoop_client.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SQOOP/package/scripts/sqoop_client.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SQOOP/package/scripts/sqoop_client.py index 4dec354..7b48dfe 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SQOOP/package/scripts/sqoop_client.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SQOOP/package/scripts/sqoop_client.py @@ -29,16 +29,13 @@ from sqoop import sqoop class SqoopClient(Script): - def get_component_name(self): - return "sqoop-client" - def pre_rolling_restart(self, env): import params env.set_params(params) if params.version and compare_versions(format_stack_version(params.version), '4.0.0.0') >= 0: conf_select.select(params.stack_name, "sqoop", params.version) - stack_select.select("sqoop-client", params.version) + stack_select.select_packages(params.version) #Execute(format("iop-select set sqoop-client {version}")) def install(self, env): http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SYSTEMML/package/scripts/systemml_client.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SYSTEMML/package/scripts/systemml_client.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SYSTEMML/package/scripts/systemml_client.py index 2d45b68..8ae1447 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SYSTEMML/package/scripts/systemml_client.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/SYSTEMML/package/scripts/systemml_client.py @@ -26,16 +26,13 @@ from resource_management.libraries.functions import stack_select class SystemMLClient(Script): - def get_component_name(self): - return "systemml-client" - def pre_upgrade_restart(self, env, upgrade_type=None): import params env.set_params(params) if params.version and check_stack_feature(StackFeature.ROLLING_UPGRADE, params.version): #conf_select.select(params.stack_name, "systemml", params.version) - stack_select.select("systemml-client", params.version) + stack_select.select_packages(params.version) def install(self, env): self.install_packages(env) http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/TITAN/package/scripts/titan_client.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/TITAN/package/scripts/titan_client.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/TITAN/package/scripts/titan_client.py index d54ccee..814fb38 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/TITAN/package/scripts/titan_client.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/TITAN/package/scripts/titan_client.py @@ -39,16 +39,13 @@ class TitanClient(Script): @OsFamilyImpl(os_family=OsFamilyImpl.DEFAULT) class TitanClientLinux(TitanClient): - def get_component_name(self): - return "titan-client" - def pre_rolling_restart(self, env): import params env.set_params(params) if params.version and compare_versions(format_stack_version(params.version), '4.2.0.0') >= 0: conf_select.select(params.stack_name, "titan", params.version) - stack_select.select("titan-client", params.version) + stack_select.select_packages(params.version) def install(self, env): self.install_packages(env) http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/YARN/package/scripts/application_timeline_server.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/YARN/package/scripts/application_timeline_server.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/YARN/package/scripts/application_timeline_server.py index d2c7b66..fbac488 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/YARN/package/scripts/application_timeline_server.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/YARN/package/scripts/application_timeline_server.py @@ -33,9 +33,6 @@ from service import service class ApplicationTimelineServer(Script): - def get_component_name(self): - return "hadoop-yarn-timelineserver" - def install(self, env): self.install_packages(env) #self.configure(env) @@ -52,7 +49,7 @@ class ApplicationTimelineServer(Script): if params.version and compare_versions(format_stack_version(params.version), '4.0.0.0') >= 0: conf_select.select(params.stack_name, "hadoop", params.version) - stack_select.select("hadoop-yarn-timelineserver", params.version) + stack_select.select_packages(params.version) #Execute(format("iop-select set hadoop-yarn-timelineserver {version}")) def start(self, env, upgrade_type=None): http://git-wip-us.apache.org/repos/asf/ambari/blob/56d2ade2/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/YARN/package/scripts/historyserver.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/YARN/package/scripts/historyserver.py b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/YARN/package/scripts/historyserver.py index f97bdf3..5e1cfea 100755 --- a/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/YARN/package/scripts/historyserver.py +++ b/ambari-server/src/main/resources/stacks/BigInsights/4.2/services/YARN/package/scripts/historyserver.py @@ -40,9 +40,6 @@ from ambari_commons.os_family_impl import OsFamilyImpl class HistoryServer(Script): - def get_component_name(self): - return "hadoop-mapreduce-historyserver" - def install(self, env): self.install_packages(env) @@ -58,7 +55,7 @@ class HistoryServer(Script): if params.version and compare_versions(format_stack_version(params.version), '4.0.0.0') >= 0: conf_select.select(params.stack_name, "hadoop", params.version) - stack_select.select("hadoop-mapreduce-historyserver", params.version) + stack_select.select_packages(params.version) #Execute(format("iop-select set hadoop-mapreduce-historyserver {version}")) #copy_tarballs_to_hdfs('mapreduce', 'hadoop-mapreduce-historyserver', params.mapred_user, params.hdfs_user, params.user_group) # MC Hammer said, "Can't touch this"