소스 검색

[liboozie] Update config checks

Do not check for workspace anymore as it is createad automatically if needed
Add check for Oozie server
Romain Rigaux 12 년 전
부모
커밋
c19deab3ec
1개의 변경된 파일9개의 추가작업 그리고 3개의 파일을 삭제
  1. 9 3
      desktop/libs/liboozie/src/liboozie/conf.py

+ 9 - 3
desktop/libs/liboozie/src/liboozie/conf.py

@@ -46,18 +46,24 @@ def config_validator():
   Called by core check_config() view.
   """
   from hadoop.cluster import get_all_hdfs
+  from liboozie.oozie_api import get_oozie
 
   res = []
 
+  status = 'down'
+  try:
+    status = str(get_oozie().get_oozie_status())
+  except:
+    pass
+  if 'NORMAL' not in status:
+    res.append((status, _('The Oozie server is not available')))
+
   class ConfigMock:
     def __init__(self, value): self.value = value
     def get(self): return self.value
     def get_fully_qualifying_key(self): return self.value
 
   for cluster in get_all_hdfs().values():
-    res.extend(validate_path(REMOTE_DEPLOYMENT_DIR, is_dir=True, fs=cluster,
-                             message=_('The deployment directory of Oozie workflows does not exist. '
-                                       'Run "Setup Examples" on the Oozie workflow page.')))
     res.extend(validate_path(ConfigMock('/user/oozie/share/lib'), is_dir=True, fs=cluster,
                              message=_('Oozie Share Lib not installed in default location.')))