ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ja...@apache.org
Subject ambari git commit: AMBARI-14820: Implement Activate HAWQ Standby wizard to allow doing failover in HA mode (missing part) (bhuvnesh2703 via jaoki)
Date Thu, 11 Feb 2016 00:45:22 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 364ee0269 -> c147b27e9


AMBARI-14820: Implement Activate HAWQ Standby wizard to allow doing failover in HA mode (missing
part) (bhuvnesh2703 via jaoki)


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

Branch: refs/heads/trunk
Commit: c147b27e9bb886ba0380e2b926903343a568ad9d
Parents: 364ee02
Author: Jun Aoki <jaoki@apache.org>
Authored: Wed Feb 10 16:45:15 2016 -0800
Committer: Jun Aoki <jaoki@apache.org>
Committed: Wed Feb 10 16:45:15 2016 -0800

----------------------------------------------------------------------
 .../resources/common-services/HAWQ/2.0.0/metainfo.xml     | 10 ++++++++++
 .../HAWQ/2.0.0/package/scripts/hawq_constants.py          |  1 +
 .../HAWQ/2.0.0/package/scripts/hawqstandby.py             |  6 ++++--
 3 files changed, 15 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/c147b27e/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml
index 21ab445..ce625eb 100644
--- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml
+++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/metainfo.xml
@@ -76,6 +76,16 @@
               <scriptType>PYTHON</scriptType>
               <timeout>600</timeout>
           </commandScript>
+          <customCommands>
+            <customCommand>
+              <name>ACTIVATE_STANDBY</name>
+              <commandScript>
+                <script>scripts/hawqstandby.py</script>
+                <scriptType>PYTHON</scriptType>
+                <timeout>1200</timeout>
+              </commandScript>
+            </customCommand>
+          </customCommands>
           <dependencies>
             <dependency>
                 <name>HDFS/HDFS_CLIENT</name>

http://git-wip-us.apache.org/repos/asf/ambari/blob/c147b27e/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py
b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py
index 01de99a..6a2d9ba 100644
--- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py
+++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawq_constants.py
@@ -27,6 +27,7 @@ YARN = "yarn"
 CLUSTER = "cluster"
 IMMEDIATE = "immediate"
 FAST = "fast"
+ACTIVATE = "activate"
 
 # Users
 root_user = "root"

http://git-wip-us.apache.org/repos/asf/ambari/blob/c147b27e/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py
b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py
index 7f5bab4..7da7f6d 100644
--- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py
+++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py
@@ -51,8 +51,10 @@ class HawqStandby(Script):
     from hawqstatus import get_pid_file
     check_process_status(get_pid_file())
 
-  def activatestandby(self, env):
-    pass
+  def activate_standby(self, env):
+    import utils
+    utils.exec_hawq_operation(hawq_constants.ACTIVATE, "{0} -a -M {1} -v".format(hawq_constants.STANDBY,
hawq_constants.FAST))
+
 
 if __name__ == "__main__":
     HawqStandby().execute()


Mime
View raw message