@Override
  public ClusterResourceManager getClusterResourceManager(ClusterResourceManager.Callback callback, SamzaApplicationState state) {
    log.info("Creating an instance of a cluster resource manager for Yarn. ");
    JobModelManager jobModelManager = state.jobModelManager;
    Config config = jobModelManager.jobModel().getConfig();
    YarnClusterResourceManager manager = new YarnClusterResourceManager(config, jobModelManager, callback, state);
    return manager;
  }
A YarnContainerProcessManagerFactory returns an implementation of a {@link ClusterResourceManager} for Yarn.
samza-yarn3/src/main/java/org/apache/samza/job/yarn/YarnResourceManagerFactory.java