ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject ambari git commit: AMBARI-13620 - Express Upgrade Packs For Accumulo (jonathanhurley)
Date Thu, 29 Oct 2015 19:32:42 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 369e8135d -> 8c33381ad


AMBARI-13620 - Express Upgrade Packs For Accumulo (jonathanhurley)


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

Branch: refs/heads/trunk
Commit: 8c33381ad7e7322b3ebe9d67e57cc313d3d66116
Parents: 369e813
Author: Jonathan Hurley <jhurley@hortonworks.com>
Authored: Thu Oct 29 10:07:16 2015 -0400
Committer: Jonathan Hurley <jhurley@hortonworks.com>
Committed: Thu Oct 29 15:32:27 2015 -0400

----------------------------------------------------------------------
 .../libraries/functions/conf_select.py          |  2 +-
 .../package/scripts/accumulo_client.py          |  4 +--
 .../package/scripts/accumulo_script.py          |  8 ++---
 .../HDP/2.2/upgrades/nonrolling-upgrade-2.3.xml | 23 +++++++++++-
 .../HDP/2.3/upgrades/nonrolling-upgrade-2.3.xml | 37 ++++++++++++--------
 .../stacks/2.2/ACCUMULO/test_accumulo_client.py |  8 ++---
 6 files changed, 56 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/8c33381a/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py
b/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py
index 2ad9a0d..620f021 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py
@@ -202,7 +202,7 @@ def create(stack_name, package, version, dry_run = False):
 
   command = "dry-run-create" if dry_run else "create-conf-dir"
 
-  code, stdout = shell.call(get_cmd(command, package, version), logoutput=False, quiet=True,
sudo=True)
+  code, stdout = shell.call(get_cmd(command, package, version), logoutput=False, quiet=False,
sudo=True)
 
   # conf-select can set more than one directory
   # per package, so return that list, especially for dry_run

http://git-wip-us.apache.org/repos/asf/ambari/blob/8c33381a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_client.py
b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_client.py
index df5e687..febee1c 100644
--- a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_client.py
+++ b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_client.py
@@ -48,7 +48,7 @@ class AccumuloClient(Script):
     raise ClientComponentHasNoStatus()
 
 
-  def pre_rolling_restart(self, env):
+  def pre_upgrade_restart(self, env, upgrade_type=None):
     import params
     env.set_params(params)
 
@@ -57,7 +57,7 @@ class AccumuloClient(Script):
     if Script.is_hdp_stack_less_than("2.2"):
       return
 
-    Logger.info("Executing Accumulo Client Rolling Upgrade pre-restart")
+    Logger.info("Executing Accumulo Client Upgrade pre-restart")
     conf_select.select(params.stack_name, "accumulo", params.version)
     hdp_select.select("accumulo-client", params.version)
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/8c33381a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_script.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_script.py
b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_script.py
index b4bf044..eda333d 100644
--- a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_script.py
+++ b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/accumulo_script.py
@@ -73,7 +73,7 @@ class AccumuloScript(Script):
     setup_conf_dir(name=self.component)
 
 
-  def start(self, env, rolling_restart=False):
+  def start(self, env, upgrade_type=None):
     import params
     env.set_params(params)
     self.configure(env) # for security
@@ -81,7 +81,7 @@ class AccumuloScript(Script):
     accumulo_service( self.component, action = 'start')
 
 
-  def stop(self, env, rolling_restart=False):
+  def stop(self, env, upgrade_type=None):
     import params
     env.set_params(params)
 
@@ -96,7 +96,7 @@ class AccumuloScript(Script):
     check_process_status(pid_file)
 
 
-  def pre_rolling_restart(self, env):
+  def pre_upgrade_restart(self, env, upgrade_type=None):
     import params
     env.set_params(params)
 
@@ -111,7 +111,7 @@ class AccumuloScript(Script):
 
     hdp_component = self.COMPONENT_TO_HDP_SELECT_MAPPING[self.component]
 
-    Logger.info("Executing Accumulo Rolling Upgrade pre-restart for {0}".format(hdp_component))
+    Logger.info("Executing Accumulo Upgrade pre-restart for {0}".format(hdp_component))
     conf_select.select(params.stack_name, "accumulo", params.version)
     hdp_select.select(hdp_component, params.version)
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/8c33381a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/nonrolling-upgrade-2.3.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/nonrolling-upgrade-2.3.xml
b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/nonrolling-upgrade-2.3.xml
index 8fca5d4..b043879 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/nonrolling-upgrade-2.3.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/nonrolling-upgrade-2.3.xml
@@ -76,6 +76,14 @@
       <service name="FLUME">
         <component>FLUME_HANDLER</component>
       </service>
+      
+      <service name="ACCUMULO">
+        <component>ACCUMULO_TRACER</component>
+        <component>ACCUMULO_GC</component>
+        <component>ACCUMULO_TSERVER</component>
+        <component>ACCUMULO_MONITOR</component>
+        <component>ACCUMULO_MASTER</component>
+      </service>      
 
       <service name="STORM">
         <component>DRPC_SERVER</component>
@@ -468,7 +476,7 @@
       </execute-stage>
     </group>
 
-    <!-- Invoke hdp-select set all after all components have been stopped by
+    <!-- Invoke hdp-select set all after all components have been stopped but
     before starting new ones. This step must be done here in order to
     ensure that components which rely on other components (like ZKFC on hadoop)
     will start on the correct versions -->
@@ -695,6 +703,19 @@
       </service>
     </group>
 
+    <group xsi:type="restart" name="ACCUMULO" title="Accumulo">
+      <service-check>false</service-check>
+      <skippable>true</skippable>
+      <service name="ACCUMULO">
+        <component>ACCUMULO_MASTER</component>
+        <component>ACCUMULO_TSERVER</component>
+        <component>ACCUMULO_MONITOR</component>
+        <component>ACCUMULO_GC</component>
+        <component>ACCUMULO_TRACER</component>
+        <component>ACCUMULO_CLIENT</component>
+      </service>
+    </group>
+
     <group xsi:type="cluster" name="POST_CLUSTER" title="Finalize {{direction.text.proper}}">
       <skippable>true</skippable>
       <execute-stage title="Check Unhealthy Hosts" id="unhealthy-hosts">

http://git-wip-us.apache.org/repos/asf/ambari/blob/8c33381a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.3.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.3.xml
b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.3.xml
index 425dbea..ef1835b 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.3.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.3.xml
@@ -54,6 +54,14 @@
       <service name="FLUME">
         <component>FLUME_HANDLER</component>
       </service>
+      
+      <service name="ACCUMULO">
+        <component>ACCUMULO_TRACER</component>
+        <component>ACCUMULO_GC</component>
+        <component>ACCUMULO_TSERVER</component>
+        <component>ACCUMULO_MONITOR</component>
+        <component>ACCUMULO_MASTER</component>
+      </service>
 
       <service name="STORM">
         <component>DRPC_SERVER</component>
@@ -244,7 +252,7 @@
       </execute-stage>
     </group>
 
-    <!-- Invoke hdp-select set all after all components have been stopped by
+    <!-- Invoke hdp-select set all after all components have been stopped but
     before starting new ones. This step must be done here in order to
     ensure that components which rely on other components (like ZKFC on hadoop)
     will start on the correct versions -->
@@ -470,18 +478,6 @@
       </execute-stage>
     </group>
 
-    <group xsi:type="restart" name="ACCUMULO" title="Accumulo">
-      <skippable>true</skippable>
-      <service name="ACCUMULO">
-        <component>ACCUMULO_MASTER</component>
-        <component>ACCUMULO_TSERVER</component>
-        <component>ACCUMULO_MONITOR</component>
-        <component>ACCUMULO_GC</component>
-        <component>ACCUMULO_TRACER</component>
-        <component>ACCUMULO_CLIENT</component>
-      </service>
-    </group>
-
     <group xsi:type="restart" name="SLIDER" title="Slider">
       <service-check>false</service-check>
       <skippable>true</skippable>
@@ -497,6 +493,19 @@
         <component>FLUME_HANDLER</component>
       </service>
     </group>
+    
+    <group xsi:type="restart" name="ACCUMULO" title="Accumulo">
+      <service-check>false</service-check>
+      <skippable>true</skippable>
+      <service name="ACCUMULO">
+        <component>ACCUMULO_MASTER</component>
+        <component>ACCUMULO_TSERVER</component>
+        <component>ACCUMULO_MONITOR</component>
+        <component>ACCUMULO_GC</component>
+        <component>ACCUMULO_TRACER</component>
+        <component>ACCUMULO_CLIENT</component>
+      </service>
+    </group>
 
     <group xsi:type="cluster" name="POST_CLUSTER" title="Finalize {{direction.text.proper}}">
       <skippable>true</skippable>
@@ -882,4 +891,4 @@
       </component>
     </service>
   </processing>
-</upgrade>
\ No newline at end of file
+</upgrade>

http://git-wip-us.apache.org/repos/asf/ambari/blob/8c33381a/ambari-server/src/test/python/stacks/2.2/ACCUMULO/test_accumulo_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.2/ACCUMULO/test_accumulo_client.py b/ambari-server/src/test/python/stacks/2.2/ACCUMULO/test_accumulo_client.py
index bc6f669..f2f72e4 100644
--- a/ambari-server/src/test/python/stacks/2.2/ACCUMULO/test_accumulo_client.py
+++ b/ambari-server/src/test/python/stacks/2.2/ACCUMULO/test_accumulo_client.py
@@ -29,7 +29,7 @@ class TestAccumuloClient(RMFTestCase):
   COMMON_SERVICES_PACKAGE_DIR = "ACCUMULO/1.6.1.2.2.0/package"
   STACK_VERSION = "2.1"
 
-  def test_pre_rolling_restart(self):
+  def test_pre_upgrade_restart(self):
     config_file = self.get_src_folder() + "/test/python/stacks/2.2/configs/default.json"
     with open(config_file, "r") as f:
       json_content = json.load(f)
@@ -39,7 +39,7 @@ class TestAccumuloClient(RMFTestCase):
 
     self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/accumulo_client.py",
       classname = "AccumuloClient",
-      command = "pre_rolling_restart",
+      command = "pre_upgrade_restart",
       config_dict = json_content,
       hdp_stack_version = self.STACK_VERSION,
       target = RMFTestCase.TARGET_COMMON_SERVICES)
@@ -48,7 +48,7 @@ class TestAccumuloClient(RMFTestCase):
     self.assertNoMoreResources()
 
   @patch("resource_management.core.shell.call")
-  def test_pre_rolling_restart_23(self, call_mock):
+  def test_pre_upgrade_restart_23(self, call_mock):
     config_file = self.get_src_folder() + "/test/python/stacks/2.2/configs/default.json"
 
     with open(config_file, "r") as f:
@@ -60,7 +60,7 @@ class TestAccumuloClient(RMFTestCase):
     mocks_dict = {}
     self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/accumulo_client.py",
       classname = "AccumuloClient",
-      command = "pre_rolling_restart",
+      command = "pre_upgrade_restart",
       config_dict = json_content,
       hdp_stack_version = self.STACK_VERSION,
       target = RMFTestCase.TARGET_COMMON_SERVICES,


Mime
View raw message