HAWQ-1061. Check filesize type.
Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/921b908e Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/921b908e Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/921b908e Branch: refs/heads/master Commit: 921b908ef30e4ee676e114136c712b80b187f36c Parents: 3136394 Author: xunzhang <[email protected]> Authored: Fri Sep 23 11:40:00 2016 +0800 Committer: xunzhang <[email protected]> Committed: Fri Sep 23 11:40:00 2016 +0800 ---------------------------------------------------------------------- tools/bin/hawqregister | 4 ++++ 1 file changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/921b908e/tools/bin/hawqregister ---------------------------------------------------------------------- diff --git a/tools/bin/hawqregister b/tools/bin/hawqregister index 570253f..3661f3e 100755 --- a/tools/bin/hawqregister +++ b/tools/bin/hawqregister @@ -483,6 +483,10 @@ class HawqRegister(object): def check_sizes_valid(): for sz in self.sizes: + if type(sz) != type(1): + logger.error('File size(%s) in yaml configuration file should be int type.' % sz) + self.failure_handler.rollback() + sys.exit(1) if sz < 0: logger.error('File size(%s) in yaml configuration file should not be less than 0.' % sz) self.failure_handler.rollback()
