public int getNumCores() {
    if (new JobConfig(this).getAutosizingEnabled() && containsKey(JobConfig.JOB_AUTOSIZING_CONTAINER_MAX_CORES)) {
      return getInt(JobConfig.JOB_AUTOSIZING_CONTAINER_MAX_CORES);
    } else if (containsKey(CLUSTER_MANAGER_MAX_CORES)) {
      return getInt(CLUSTER_MANAGER_MAX_CORES);
    } else if (containsKey(CONTAINER_MAX_CPU_CORES)) {
      log.info("Configuration {} is deprecated. Please use {}", CONTAINER_MAX_CPU_CORES, CLUSTER_MANAGER_MAX_CORES);
      return getInt(CONTAINER_MAX_CPU_CORES);
    } else {
      return DEFAULT_CPU_CORES;
    }
  }
Return the value of CLUSTER_MANAGER_MAX_CORES or CONTAINER_MAX_CPU_CORES (in that order) if autosizing is not enabled,
otherwise returns the value of JOB_AUTOSIZING_CONTAINER_MAX_CORES.
@return
samza-core/src/main/java/org/apache/samza/config/ClusterManagerConfig.java