浏览代码

HUE-9056 [impala] Fix exception when impala conf path is missing.

Change-Id: I417fdbdf811c193d2cf9484fc9e287d6a7cc5516
Jean-Francois Desjeans Gauthier 6 年之前
父节点
当前提交
201b6af279
共有 2 个文件被更改,包括 2 次插入1 次删除
  1. 1 0
      apps/impala/src/impala/conf.py
  2. 1 1
      apps/impala/src/impala/impala_flags.py

+ 1 - 0
apps/impala/src/impala/conf.py

@@ -105,6 +105,7 @@ CONFIG_WHITELIST = Config(
 IMPALA_CONF_DIR = Config(
 IMPALA_CONF_DIR = Config(
   key='impala_conf_dir',
   key='impala_conf_dir',
   help=_t('Impala configuration directory, where impala_flags is located.'),
   help=_t('Impala configuration directory, where impala_flags is located.'),
+  type=str,
   default=os.environ.get("HUE_CONF_DIR", get_desktop_root("conf")) + '/impala-conf'
   default=os.environ.get("HUE_CONF_DIR", get_desktop_root("conf")) + '/impala-conf'
 )
 )
 
 

+ 1 - 1
apps/impala/src/impala/impala_flags.py

@@ -106,5 +106,5 @@ def _parse_impala_flags():
       LOG.error('Cannot read from "%s": %s' % (impala_flags_path, err))
       LOG.error('Cannot read from "%s": %s' % (impala_flags_path, err))
     _IMPALA_FLAGS = {}
     _IMPALA_FLAGS = {}
   except Exception as ex:
   except Exception as ex:
-    LOG.error('Failed to parse Impala config from "%s": %s' % (impala_flags_path, ex))
+    LOG.error('Failed to parse Impala flag file %s' % ex)
     _IMPALA_FLAGS = {}
     _IMPALA_FLAGS = {}