cameronlee314 commented on a change in pull request #1266: Adding internal
autosizing related configs
URL: https://github.com/apache/samza/pull/1266#discussion_r374852654
##########
File path:
samza-core/src/main/java/org/apache/samza/config/ClusterManagerConfig.java
##########
@@ -143,8 +143,15 @@ public int getAllocatorSleepTime() {
}
}
+ /**
+ * 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
+ */
public int getNumCores() {
- if (containsKey(CLUSTER_MANAGER_MAX_CORES)) {
+ if (getBoolean(JobConfig.JOB_AUTOSIZING_ENABLED, false) &&
containsKey(JobConfig.JOB_AUTOSIZING_CONTAINER_MAX_CORES)) {
Review comment:
Should this use `getAutosizingEnabled` instead of checking the config
directly? Then if `getAutosizingEnabled` gets changed in the future, this would
not change.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services