Exemple #1
0
 def decorate(api, *args, **kwargs):
   try:
     return funct(api, *args, **kwargs)
   except Exception, ex:
     if 'Connection refused' in str(ex):
       LOG.info('JobTracker not available, trying JT plugin HA: %s.' % ex)
       rm_ha = get_next_ha_yarncluster()
       if rm_ha is not None:
         config, api.resource_manager_api = rm_ha
         return funct(api, *args, **kwargs)
     raise ex
Exemple #2
0
 def decorate(api, *args, **kwargs):
   try:
     return funct(api, *args, **kwargs)
   except Exception, ex:
     ex_message = str(ex)
     if 'Connection refused' in ex_message or 'standby RM' in ex_message:
       LOG.info('Resource Manager not available, trying another RM: %s.' % ex)
       rm_ha = get_next_ha_yarncluster()
       if rm_ha is not None:
         config, api.resource_manager_api = rm_ha
         return funct(api, *args, **kwargs)
     raise ex
Exemple #3
0
 def decorate(api, *args, **kwargs):
     try:
         return funct(api, *args, **kwargs)
     except Exception, ex:
         if 'Connection refused' in str(ex):
             LOG.info('JobTracker not available, trying JT plugin HA: %s.' %
                      ex)
             rm_ha = get_next_ha_yarncluster()
             if rm_ha is not None:
                 config, api.resource_manager_api = rm_ha
                 return funct(api, *args, **kwargs)
         raise ex