hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhuvnesh2...@apache.org
Subject incubator-hawq git commit: HAWQ-679 Included ignore_bad_hosts command to remove standby
Date Thu, 14 Apr 2016 22:33:35 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/HAWQ-679 [created] 65e270337


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/65e27033
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/65e27033
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/65e27033

Branch: refs/heads/HAWQ-679
Commit: 65e2703378d20bd824a48ba5c5d30014822f0533
Parents: 1435927
Author: Bhuvnesh Chaudhary <bchaudhary@pivotal.io>
Authored: Thu Apr 14 15:35:49 2016 -0700
Committer: Bhuvnesh Chaudhary <bchaudhary@pivotal.io>
Committed: Thu Apr 14 15:35:49 2016 -0700

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


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/65e27033/tools/bin/hawq_ctl
----------------------------------------------------------------------
diff --git a/tools/bin/hawq_ctl b/tools/bin/hawq_ctl
index 32752b6..6b99cae 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