You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by rl...@apache.org on 2016/08/24 02:43:06 UTC

incubator-hawq git commit: HAWQ-1008. Remove legacy options for hawq command line tools

Repository: incubator-hawq
Updated Branches:
  refs/heads/master 56b704343 -> 8c69fa50f


HAWQ-1008. Remove legacy options for hawq command line tools


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

Branch: refs/heads/master
Commit: 8c69fa50f5671de2a5615083cd68c89b13e529ba
Parents: 56b7043
Author: rlei <rl...@pivotal.io>
Authored: Fri Aug 19 11:08:31 2016 +0800
Committer: rlei <rl...@pivotal.io>
Committed: Wed Aug 24 10:38:18 2016 +0800

----------------------------------------------------------------------
 tools/bin/hawq                   |  2 +-
 tools/bin/hawqconfig             | 10 +++-------
 tools/bin/hawqpylib/HAWQ_HELP.py |  2 --
 tools/bin/hawqstate              | 11 +++--------
 4 files changed, 7 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/8c69fa50/tools/bin/hawq
----------------------------------------------------------------------
diff --git a/tools/bin/hawq b/tools/bin/hawq
index 41130e9..0bebf1e 100755
--- a/tools/bin/hawq
+++ b/tools/bin/hawq
@@ -130,7 +130,7 @@ def main():
         result = local_ssh(cmd)
     elif hawq_command == "restart":
         if second_arg not in cluster_type_list:
-            print START_HELP
+            print RESTART_HELP
             sys.exit(1)
         cmd = "%s; hawq_ctl stop %s" % (source_hawq_env, sub_args)
         check_return_code(local_ssh(cmd))

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/8c69fa50/tools/bin/hawqconfig
----------------------------------------------------------------------
diff --git a/tools/bin/hawqconfig b/tools/bin/hawqconfig
index 04e1e15..d2bc63d 100755
--- a/tools/bin/hawqconfig
+++ b/tools/bin/hawqconfig
@@ -45,9 +45,6 @@ def parseargs():
     parser.add_option("-v", "--value",
                       dest="property_value",
                       help="Set HAWQ Property value.")
-    parser.add_option("-d",
-                      dest="hawq_home",
-                      help="HAWQ home directory.")
     (options, args) = parser.parse_args()
 
     if options.quiet:
@@ -184,10 +181,9 @@ def sync_hawq_site(config_dir, host_list, ignore_bad_hosts):
 if __name__ == '__main__':
     options, args = parseargs()
 
-    if options.hawq_home is None:
-        GPHOME = os.getenv('GPHOME')
-    else:
-        GPHOME = options.hawq_home
+    GPHOME = os.getenv('GPHOME')
+    if not GPHOME:
+        sys.exit("GPHOME environment variable not set, exit")
     hawq_site = HawqXMLParser(GPHOME)
     hawq_site.get_all_values()
     org_config_file = "%s/etc/hawq-site.xml" % GPHOME

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/8c69fa50/tools/bin/hawqpylib/HAWQ_HELP.py
----------------------------------------------------------------------
diff --git a/tools/bin/hawqpylib/HAWQ_HELP.py b/tools/bin/hawqpylib/HAWQ_HELP.py
index b3a2dee..fec86e2 100755
--- a/tools/bin/hawqpylib/HAWQ_HELP.py
+++ b/tools/bin/hawqpylib/HAWQ_HELP.py
@@ -178,8 +178,6 @@ The "options" are:
    -l --logdir         Sets log dir of management tools.
    -q --quiet          Run in quiet mode.
    -v --verbose        Displays detailed status, progress and error messages output by the utility.
-   -d --datadir        Specify HAWQ master data directory.
-   --hawqhome          Specify HAWQ install directory.
 
 See 'hawq --help' for more information on other commands.
 """

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/8c69fa50/tools/bin/hawqstate
----------------------------------------------------------------------
diff --git a/tools/bin/hawqstate b/tools/bin/hawqstate
index 16ec58c..9870cf1 100755
--- a/tools/bin/hawqstate
+++ b/tools/bin/hawqstate
@@ -35,10 +35,6 @@ def parseargs():
     parser.add_option("-a", "--prompt", action="store_false",
                       dest="prompt", default=True,
                       help="Execute without prompt.")
-    parser.add_option("-d", "--datadir", dest="master_dir",
-                      help="HAWQ Master data directory.")
-    parser.add_option("--hawqhome", dest="hawq_home",
-                      help="HAWQ Master data directory.")
     parser.add_option("-l", "--logdir", dest="logDir",
                       help="Sets the directory for log files")
     (options, args) = parser.parse_args()
@@ -132,10 +128,9 @@ if __name__ == '__main__':
 
     logger, log_filename = setup_hawq_tool_logging('hawq_state',getLocalHostname(),getUserName(), options.logDir) 
 
-    if options.hawq_home is None:
-        GPHOME = os.getenv('GPHOME')
-    else:
-        GPHOME = options.hawq_home
+    GPHOME = os.getenv('GPHOME')
+    if not GPHOME:
+        sys.exit("GPHOME environment variable not set, exit")
 
     hawq_site = HawqXMLParser(GPHOME)
     hawq_site.get_all_values()