|
@@ -71,11 +71,13 @@ def rm_ha(funct):
|
|
|
ex_message = str(ex)
|
|
ex_message = str(ex)
|
|
|
if 'Connection refused' in ex_message or 'Connection aborted' in ex_message or 'standby RM' in ex_message:
|
|
if 'Connection refused' in ex_message or 'Connection aborted' in ex_message or 'standby RM' in ex_message:
|
|
|
LOG.info('Resource Manager not available, trying another RM: %s.' % ex)
|
|
LOG.info('Resource Manager not available, trying another RM: %s.' % ex)
|
|
|
|
|
+ user = api.user()
|
|
|
rm_ha = get_next_ha_yarncluster()
|
|
rm_ha = get_next_ha_yarncluster()
|
|
|
if rm_ha is not None:
|
|
if rm_ha is not None:
|
|
|
if rm_ha[1].url == api.resource_manager_api.url:
|
|
if rm_ha[1].url == api.resource_manager_api.url:
|
|
|
raise ex
|
|
raise ex
|
|
|
config, api.resource_manager_api = rm_ha
|
|
config, api.resource_manager_api = rm_ha
|
|
|
|
|
+ api.setuser(user)
|
|
|
return funct(api, *args, **kwargs)
|
|
return funct(api, *args, **kwargs)
|
|
|
raise ex
|
|
raise ex
|
|
|
return wraps(funct)(decorate)
|
|
return wraps(funct)(decorate)
|