Github user ictmalili commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/961#discussion_r83187014
  
    --- Diff: tools/bin/hawqregister ---
    @@ -60,14 +60,18 @@ def option_parser():
     
     def register_yaml_dict_check(D, table_column_num, src_tablename):
         '''check exists'''
    -    check_list = ['DFS_URL', 'Distribution_Policy', 'FileFormat', 
'TableName', 'Bucketnum']
    +    check_list = ['DFS_URL', 'Distribution_Policy', 'FileFormat', 
'TableName']
         for attr in check_list:
             if D.get(attr) is None:
                 logger.error('Wrong configuration yaml file format: "%s" 
attribute does not exist.\n See example in "hawq register --help".' % attr)
                 sys.exit(1)
    -    if D['Bucketnum'] <= 0:
    -        logger.error('Bucketnum should not be zero, please check your yaml 
configuration file.')
    -        sys.exit(1)
    +    if D['Distribution_Policy'].startswith('DISTRIBUTED BY'):
    +        if D.get('Bucketnum') is None:
    +            logger.error('Wrong configuration yaml file format: "%s" 
attribute does not exist.\n See example in "hawq register --help".' % attr)
    +            sys.exit(1)
    +        if D['Bucketnum'] <= 0:
    +            logger.error('Bucketnum should not be zero, please check your 
yaml configuration file.')
    --- End diff --
    
    Could we modify the error message.  "Should be a positive integer"


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to