ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smoha...@apache.org
Subject ambari git commit: AMBARI-18047. Zeppelin to participate in RU/EU orchestration and advertise a version (Renjith Kamath via smohanty)
Date Sun, 07 Aug 2016 01:37:11 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 2c5680bc6 -> 9beb51598


AMBARI-18047. Zeppelin to participate in RU/EU orchestration and advertise a version (Renjith
Kamath via smohanty)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9beb5159
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9beb5159
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9beb5159

Branch: refs/heads/branch-2.4
Commit: 9beb515981caa294aa48ae5f49000d43d1901cc0
Parents: 2c5680b
Author: Sumit Mohanty <smohanty@hortonworks.com>
Authored: Sat Aug 6 18:35:43 2016 -0700
Committer: Sumit Mohanty <smohanty@hortonworks.com>
Committed: Sat Aug 6 18:37:03 2016 -0700

----------------------------------------------------------------------
 .../ZEPPELIN/0.6.0.2.5/metainfo.xml             |  1 +
 .../0.6.0.2.5/package/scripts/master.py         | 22 ++++++++++++++++++--
 .../0.6.0.2.5/package/scripts/params.py         |  4 ++++
 .../HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml | 14 +++++++++++++
 .../stacks/HDP/2.5/upgrades/upgrade-2.5.xml     |  9 ++++++++
 5 files changed, 48 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/9beb5159/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/metainfo.xml
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/metainfo.xml
index 1eb3155..382e913 100644
--- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/metainfo.xml
+++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/metainfo.xml
@@ -32,6 +32,7 @@ limitations under the License.
           <displayName>Zeppelin Notebook</displayName>
           <category>MASTER</category>
           <cardinality>1</cardinality>
+          <versionAdvertised>true</versionAdvertised>
           <commandScript>
             <script>scripts/master.py</script>
             <scriptType>PYTHON</scriptType>

http://git-wip-us.apache.org/repos/asf/ambari/blob/9beb5159/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index 4202c0c..133b59c 100644
--- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -29,9 +29,18 @@ from resource_management.core.source import StaticFile
 from resource_management.libraries import XmlConfig
 from resource_management.libraries.functions.check_process_status import check_process_status
 from resource_management.libraries.functions.format import format
+from resource_management.libraries.functions import conf_select
+from resource_management.libraries.functions import stack_select
+from resource_management.libraries.functions import StackFeature
+from resource_management.libraries.functions.stack_features import check_stack_feature
+from resource_management.libraries.functions.version import format_stack_version
 from resource_management.libraries.script.script import Script
 
 class Master(Script):
+
+  def get_component_name(self):
+    return "zeppelin-server"
+
   def install(self, env):
     import params
     env.set_params(params)
@@ -138,13 +147,13 @@ class Master(Script):
       File(format("{params.conf_dir}/hbase-site.xml"), content=StaticFile("/etc/hbase/conf/hbase-site.xml"),
            owner=params.zeppelin_user, group=params.zeppelin_group)
 
-  def stop(self, env):
+  def stop(self, env, upgrade_type=None):
     import params
     self.create_zeppelin_log_dir(env)
     Execute(params.zeppelin_dir + '/bin/zeppelin-daemon.sh stop >> ' + params.zeppelin_log_file,
             user=params.zeppelin_user)
 
-  def start(self, env):
+  def start(self, env, upgrade_type=None):
     import params
     import status_params
     import time
@@ -195,6 +204,15 @@ class Master(Script):
     config_data = json.loads(config_content)
     return config_data
 
+  def pre_upgrade_restart(self, env, upgrade_type=None):
+    Logger.info("Executing Stack Upgrade pre-restart")
+    import params
+    env.set_params(params)
+
+    if params.version and check_stack_feature(StackFeature.ROLLING_UPGRADE, format_stack_version(params.version)):
+      conf_select.select(params.stack_name, "zeppelin", params.version)
+      stack_select.select("zeppelin-server", params.version)
+
   def set_interpreter_settings(self, config_data):
     import params
     import json

http://git-wip-us.apache.org/repos/asf/ambari/blob/9beb5159/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
index 536ffab..340315f 100644
--- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
@@ -66,6 +66,10 @@ try:
 except:
   pass
 
+# New Cluster Stack Version that is defined during the RESTART of a Rolling Upgrade
+version = default("/commandParams/version", None)
+stack_name = default("/hostLevelParams/stack_name", None)
+
 # params from zeppelin-config
 zeppelin_port = str(config['configurations']['zeppelin-config']['zeppelin.server.port'])
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/9beb5159/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml
b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml
index 42c2e23..370373b 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml
@@ -109,6 +109,10 @@
         <component>LIVY_SERVER</component>
       </service>
 
+      <service name="ZEPPELIN">
+        <component>ZEPPELIN_MASTER</component>
+      </service>
+
       <service name="HIVE">
         <component>WEBHCAT_SERVER</component>
         <component>HIVE_SERVER</component>
@@ -506,6 +510,16 @@
       </service>
     </group>
 
+    <group xsi:type="restart" name="ZEPPELIN" title="Spark">
+      <service-check>false</service-check>
+      <skippable>true</skippable>
+      <supports-auto-skip-failure>false</supports-auto-skip-failure>
+      <parallel-scheduler/>
+      <service name="ZEPPELIN">
+        <component>ZEPPELIN_MASTER</component>
+      </service>
+    </group>
+
     <group xsi:type="restart" name="ATLAS" title="Atlas">
       <service-check>false</service-check>
       <skippable>true</skippable>

http://git-wip-us.apache.org/repos/asf/ambari/blob/9beb5159/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml
index 6e45b3b..e3b6da3 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml
@@ -249,6 +249,15 @@
       </service>
     </group>
 
+    <group name="ZEPPELIN" title="Zeppelin">
+      <skippable>true</skippable>
+      <supports-auto-skip-failure>false</supports-auto-skip-failure>
+      <service-check>false</service-check>
+      <service name="ZEPPELIN">
+        <component>ZEPPELIN_MASTER</component>
+      </service>
+    </group>
+
     <group name="SPARK_CLIENTS" title="Spark Clients">
       <skippable>true</skippable>
       <service name="SPARK">


Mime
View raw message