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