hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject incubator-hawq git commit: HAWQ-679 Included ignore_bad_hosts command to remove standby
Date Fri, 15 Apr 2016 03:19:04 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 2a72dfc67 -> a5628a297


HAWQ-679 Included ignore_bad_hosts command to remove standby


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

Branch: refs/heads/master
Commit: a5628a2973176dae32d0cfba44bc1f11ea68a0f8
Parents: 2a72dfc
Author: Bhuvnesh Chaudhary <bchaudhary@pivotal.io>
Authored: Thu Apr 14 15:35:49 2016 -0700
Committer: rlei <rlei@pivotal.io>
Committed: Fri Apr 15 11:18:41 2016 +0800

----------------------------------------------------------------------
 tools/bin/hawq_ctl | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/a5628a29/tools/bin/hawq_ctl
----------------------------------------------------------------------
diff --git a/tools/bin/hawq_ctl b/tools/bin/hawq_ctl
index aaab010..91ac814 100755
--- a/tools/bin/hawq_ctl
+++ b/tools/bin/hawq_ctl
@@ -69,6 +69,7 @@ class HawqInit:
         self.shared_buffers = opts.shared_buffers
         self.default_hash_table_bucket_number = opts.default_hash_table_bucket_number
         self.lock = threading.Lock()
+        self.ignore_bad_hosts = opts.ignore_bad_hosts
         self._get_config()
         self._write_config()
         self._get_ips()
@@ -296,7 +297,8 @@ class HawqInit:
             logger.info("Stop HAWQ cluster")
             cmd = "%s; hawq stop master -a -M fast -q" % source_hawq_env
             check_return_code(local_ssh(cmd, logger), logger, "Stop HAWQ master failed, exit")
-            cmd = "%s; hawq stop allsegments -a -q" % source_hawq_env
+            ignore_bad_hosts = '--ignore-bad-hosts' if self.ignore_bad_hosts else ''
+            cmd = "%s; hawq stop allsegments -a -q %s" % (source_hawq_env, ignore_bad_hosts)
             check_return_code(local_ssh(cmd, logger), logger, "Stop HAWQ segments failed,
exit")
             logger.info("Start HAWQ master")
             cmd = "%s; hawq start master -m -q" % source_hawq_env


Mime
View raw message