|
@@ -82,9 +82,16 @@ def config_validator(user):
|
|
|
if 'NORMAL' not in status:
|
|
if 'NORMAL' not in status:
|
|
|
res.append((status, _('The Oozie server is not available')))
|
|
res.append((status, _('The Oozie server is not available')))
|
|
|
|
|
|
|
|
- api = get_oozie(user)
|
|
|
|
|
- intrumentation = api.get_instrumentation()
|
|
|
|
|
- sharelib_url = [param['value'] for group in intrumentation['variables'] for param in group['data'] if param['name'] == 'sharelib.system.libpath']
|
|
|
|
|
|
|
+ api = get_oozie(user, api_version="v2")
|
|
|
|
|
+
|
|
|
|
|
+ configuration = api.get_configuration()
|
|
|
|
|
+ if 'org.apache.oozie.service.MetricsInstrumentationService' in [c.strip() for c in configuration.get('oozie.services.ext', '').split(',')]:
|
|
|
|
|
+ metrics = api.get_metrics()
|
|
|
|
|
+ sharelib_url = 'gauges' in metrics and 'libs.sharelib.system.libpath' in metrics['gauges'] and [metrics['gauges']['libs.sharelib.system.libpath']['value']] or []
|
|
|
|
|
+ else:
|
|
|
|
|
+ intrumentation = api.get_instrumentation()
|
|
|
|
|
+ sharelib_url = [param['value'] for group in intrumentation['variables'] for param in group['data'] if param['name'] == 'sharelib.system.libpath']
|
|
|
|
|
+
|
|
|
if sharelib_url:
|
|
if sharelib_url:
|
|
|
sharelib_url = Hdfs.urlsplit(sharelib_url[0])[2]
|
|
sharelib_url = Hdfs.urlsplit(sharelib_url[0])[2]
|
|
|
|
|
|