def get_cluster_for_job_submission():
 yarn = get_next_ha_yarncluster()
 if yarn:
  return yarn
 mr = get_next_ha_mrcluster()
 if (mr is not None):
  return mr
 return None

def get_cluster_for_job_submission ( ) : yarn = get_next_ha_yarncluster ( ) if yarn : return yarn mr = get_next_ha_mrcluster ( ) if ( mr is not None ) : return mr return None
check the submit_to for each mr/yarn cluster .