فهرست منبع

[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.')))