-
Notifications
You must be signed in to change notification settings - Fork 334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SAMZA-2452 : Adding internal autosizing related configs #1266
Conversation
@cameronlee314 @abhishekshivanna can you review? |
samza-core/src/main/java/org/apache/samza/config/ClusterManagerConfig.java
Outdated
Show resolved
Hide resolved
samza-core/src/main/java/org/apache/samza/config/ClusterManagerConfig.java
Outdated
Show resolved
Hide resolved
samza-core/src/main/java/org/apache/samza/config/JobConfig.java
Outdated
Show resolved
Hide resolved
samza-core/src/main/java/org/apache/samza/config/JobConfig.java
Outdated
Show resolved
Hide resolved
samza-core/src/main/java/org/apache/samza/config/JobConfig.java
Outdated
Show resolved
Hide resolved
samza-core/src/main/scala/org/apache/samza/util/CoordinatorStreamUtil.scala
Show resolved
Hide resolved
samza-core/src/main/scala/org/apache/samza/config/ShellCommandConfig.scala
Show resolved
Hide resolved
Can you please add a JIRA ticket to the PR and add an "API changes" section to the description (see https://cwiki.apache.org/confluence/display/SAMZA/SEP-25%3A+PR+Title+And+Description+Guidelines)? |
Addressed all comments, please take a look |
// opts set without -Xmx, autosizing max heap set | ||
shellCommandConfig = new ShellCommandConfig(new MapConfig( | ||
ImmutableMap.of(JobConfig.JOB_AUTOSIZING_ENABLED, "true", JobConfig.JOB_AUTOSIZING_CONTAINER_MAX_HEAP_MB, | ||
"1024"))); | ||
assertEquals(Option.apply("-Xmx1024m"), shellCommandConfig.getTaskOpts()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this section is the same as the block above. Seems like the code doesn't match the comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I saw your change, but I meant to refer to the lines immediately above this. I think this code block needs to be changed (not removed) to have a non-empty opts that doesn't have an -Xmx param.
- I would also suggest adding a test in which opts has -Xmx but needs to be replaced by the autosizing config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing to add on to what @cameronlee314 already mentioned. LGTM.
@@ -130,6 +130,15 @@ | |||
public static final String CONTAINER_METADATA_FILENAME_FORMAT = "%s.metadata"; // Filename: <containerID>.metadata | |||
public static final String CONTAINER_METADATA_DIRECTORY_SYS_PROPERTY = "samza.log.dir"; | |||
|
|||
// Auto-sizing related configs tthat ake precedence over respective sizing confings job.container.count, etc, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: typo tthat ake
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you still have a typo ("that ake") after your last change.
|
||
String taskOpts = "-Dproperty=value"; | ||
shellCommandConfig = new ShellCommandConfig(new MapConfig( | ||
ImmutableMap.of(ShellCommandConfig.TASK_JVM_OPTS(), taskOpts, JobConfig.JOB_AUTOSIZING_ENABLED, "false"))); | ||
assertEquals(Option.apply(taskOpts), shellCommandConfig.getTaskOpts()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this should be removed. It is actually a different test case (i.e. autosizing is disabled).
Adding internal autosizing related configs, can be used by an external controller.
These sizing-related configs (e.g., container-count, etc) take precedence when job.autosizing.enabled is set, otherwise existing behavior is retained.
Symptom: Sizing configs set by a controller need to be different from user-facing configs.
Cause: --
Fix: Added internal configs for sizing related configs. Added tests.
The enabled config is also needs to be emitted by the DiagnosticsManager.
API Changes: Adding internal autosizing related configs (job.autosizing.enabled, job.autosizing.container.count, job.autosizing.container.thread.pool.size, job.autosizing.maxheap.mb, job.autosizing.cpu.cores) , can be used by an external controller. These sizing-related configs (e.g., container-count, etc) take precedence when job.autosizing.enabled is set, otherwise existing behavior is retained.