private void validateConfig() {
    ApplicationConfig appConfig = new ApplicationConfig(config);
    ClusterManagerConfig clusterConfig = new ClusterManagerConfig(config);
    // currently we don't support host-affinity in batch mode
    if (appConfig.getAppMode() == ApplicationConfig.ApplicationMode.BATCH && clusterConfig.getHostAffinityEnabled()) {
      throw new SamzaException(String.format("Host affinity is not supported in batch mode. Please configure %s=false.",
          ClusterManagerConfig.JOB_HOST_AFFINITY_ENABLED));
    }
  }
The ExecutionPlanner creates the physical execution graph for the {@link ApplicationDescriptorImpl}, and
the intermediate topics needed for the execution.
samza-core/src/main/java/org/apache/samza/execution/ExecutionPlanner.java