This is an automated email from the ASF dual-hosted git repository.
huor pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hawq.git
The following commit(s) were added to refs/heads/master by this push:
new 35cabab HAWQ-1701. enable feature test in apache hawq
35cabab is described below
commit 35cabab1b815709326ef66e97424583e3cccf9a5
Author: oushu1tuyu1 <[email protected]>
AuthorDate: Tue Apr 16 17:45:45 2019 +0800
HAWQ-1701. enable feature test in apache hawq
---
tools/bin/hawqpylib/hawqlib.py | 4 ++++
tools/bin/hawqregister | 5 ++++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/tools/bin/hawqpylib/hawqlib.py b/tools/bin/hawqpylib/hawqlib.py
index 6914118..5e10b4d 100755
--- a/tools/bin/hawqpylib/hawqlib.py
+++ b/tools/bin/hawqpylib/hawqlib.py
@@ -259,6 +259,10 @@ def local_ssh(cmd, logger = None, warning = False):
logger.error(stderr.strip())
else:
logger.warn(stderr.strip())
+
+ if result.returncode == 1 or result.returncode == 2:
+ logger.warn("warning: Command can be found but cannot be executed
correctly ")
+
return result.returncode
diff --git a/tools/bin/hawqregister b/tools/bin/hawqregister
index b0be6f3..0a9bdc5 100755
--- a/tools/bin/hawqregister
+++ b/tools/bin/hawqregister
@@ -1205,7 +1205,10 @@ if __name__ == '__main__':
if (options.yml_config or options.force) and options.filepath:
parser.print_help(sys.stderr)
sys.exit(1)
- if local_ssh('hdfs'):
+ local_ssh_hdfs = local_ssh('hdfs',logger)
+ ssh_returncode_arr = [0,1,2,127]
+ assert(local_ssh_hdfs in ssh_returncode_arr)
+ if local_ssh('hdfs') == 127:
logger.error('Command "hdfs" is not available.')
sys.exit(1)
main(options, args)