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