hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject incubator-hawq git commit: HAWQ-1405. 'hawq stop --reload' should not stop RPS
Date Mon, 27 Mar 2017 02:30:38 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 32e3e215a -> 1f23cfcaf


HAWQ-1405. 'hawq stop --reload' should not stop RPS


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/1f23cfca
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/1f23cfca
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/1f23cfca

Branch: refs/heads/master
Commit: 1f23cfcaf1d230e0e2329dfb34f589b7893c322b
Parents: 32e3e21
Author: interma <interma@outlook.com>
Authored: Fri Mar 24 11:22:56 2017 +0800
Committer: Wen Lin <wlin@pivotal.io>
Committed: Mon Mar 27 10:29:50 2017 +0800

----------------------------------------------------------------------
 tools/bin/hawq_ctl | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/1f23cfca/tools/bin/hawq_ctl
----------------------------------------------------------------------
diff --git a/tools/bin/hawq_ctl b/tools/bin/hawq_ctl
index acfb0c3..cd479cd 100755
--- a/tools/bin/hawq_ctl
+++ b/tools/bin/hawq_ctl
@@ -962,10 +962,10 @@ class HawqStop:
             else:
                 logger.info("Standby master %s successfully" % self.stop_action_past)
         if self.hawq_acl_type == 'ranger':
-            self.stop_rps()
+            self._stop_rps()
         if self.hawq_acl_type == 'unknown':
             logger.warning("Try to stop RPS when hawq_acl_type is unknown")
-            self.stop_rps(check_ret = False)
+            self._stop_rps(check_ret = False)
 
         # Execute segment stop command on each node.
         segments_return_flag = self._stopAllSegments()
@@ -1041,14 +1041,14 @@ class HawqStop:
             logger.info("Segments %s successfully" % self.stop_action_past)
         return total_return_flag
 
-    def _stop_rps(self):
-        cmd_str = "%s/ranger/bin/rps.sh stop" % (self.GPHOME)
-        result = remote_ssh(cmd_str, self.master_host_name, self.user)
-        return result
 
-    def stop_rps(self, check_ret = True):
+    def _stop_rps(self, check_ret = True):
+        if self.hawq_reload:
+            # not stop RPS when running 'hawq stop --reload'.
+            return
         logger.info("Stop Ranger plugin service")
-        result = self._stop_rps()
+        cmd_str = "%s/ranger/bin/rps.sh stop" % (self.GPHOME)
+        result = remote_ssh(cmd_str, self.master_host_name, self.user)
         if check_ret:
             check_return_code(result, logger, \
                           "Ranger plugin service stop failed, exit", "Ranger plugin service
stopped successfully")
@@ -1058,10 +1058,10 @@ class HawqStop:
             check_return_code(self._stop_master(), logger, \
                               "Master %s failed, exit" % self.stop_action, "Master %s successfully"
% self.stop_action_past)
             if self.hawq_acl_type == 'ranger':
-                self.stop_rps()
+                self._stop_rps()
             if self.hawq_acl_type == 'unknown':
                 logger.warning("Try to stop RPS when hawq_acl_type is unknown")
-                self.stop_rps(check_ret = False)
+                self._stop_rps(check_ret = False)
         elif self.node_type == "standby":
             if self.standby_host_name.lower() not in ('', 'none'):
                 check_return_code(self._stop_standby(), logger, \


Mime
View raw message