def get_cluster_addr_for_job_submission():
 if is_yarn():
  if get_yarn().LOGICAL_NAME.get():
   return get_yarn().LOGICAL_NAME.get()
 conf = get_cluster_conf_for_job_submission()
 if (conf is None):
  return None
 return ('%s:%s' % (conf.HOST.get(), conf.PORT.get()))

def get_cluster_addr_for_job_submission ( ) : if is_yarn ( ) : if get_yarn ( ) . LOGICAL_NAME . get ( ) : return get_yarn ( ) . LOGICAL_NAME . get ( ) conf = get_cluster_conf_for_job_submission ( ) if ( conf is None ) : return None return ( '%s:%s' % ( conf . HOST . get ( ) , conf . PORT . get ( ) ) )
check the submit_to for each mr/yarn cluster .