Эх сурвалжийг харах

[core] Add notification to the admin when Oozie is not in good status

Romain Rigaux 13 жил өмнө
parent
commit
b9fbce21c6

+ 10 - 0
desktop/libs/liboozie/src/liboozie/conf.py

@@ -46,9 +46,19 @@ 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