Uploaded image for project: 'Apache HAWQ (Retired)'
  1. Apache HAWQ (Retired)
  2. HAWQ-1127

HAWQ should print error message instead of python function stack when yaml file is invalid.

    XMLWordPrintableJSON

Details

    Description

      when use a invalid yaml file to register, hawq prints python stack:
      [linw@linw-rhel feature]$ hawq register --force -d hawq_feature_test -c /home/linw/workspace/hawq_working/apache-hawq/src/test/feature/ManagementTool/partition/force_mode_normal.yml testhawqregister_testpartitionforcemodenormal.nt
      20161031:12:48:49:557022 hawqregister:linw-rhel:linw-[INFO]:-try to connect database localhost:5432 hawq_feature_test
      Traceback (most recent call last):
      File "/home/linw/hawq-bin/bin/hawqregister", line 1137, in <module>
      main(options, args)
      File "/home/linw/hawq-bin/bin/hawqregister", line 1093, in main
      ins.prepare()
      File "/home/linw/hawq-bin/bin/hawqregister", line 1021, in prepare
      self._option_parser_yml(options.yml_config)
      File "/home/linw/hawq-bin/bin/hawqregister", line 475, in _option_parser_yml
      partitions_constraint = [d['Constraint'] for d in params[Format_FileLocations]['Partitions']]
      KeyError: 'Constraint'

      Instead, hawq should print an error message.

      Attachments

        Issue Links

          Activity

            People

              wlin Wen Lin
              wlin Wen Lin
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: