Skip to content
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

Merged
merged 8 commits into from
Feb 7, 2020

Conversation

rmatharu-zz
Copy link
Contributor

@rmatharu-zz rmatharu-zz commented Feb 3, 2020

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.

@rmatharu-zz rmatharu-zz requested review from prateekm and cameronlee314 and removed request for prateekm February 3, 2020 19:34
@prateekm
Copy link
Contributor

prateekm commented Feb 3, 2020

@cameronlee314 @abhishekshivanna can you review?

@cameronlee314
Copy link
Contributor

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)?

@rmatharu-zz rmatharu-zz changed the title Adding internal autosizing related configs SAMZA-2452 : Adding internal autosizing related configs Feb 4, 2020
@rmatharu-zz
Copy link
Contributor Author

Addressed all comments, please take a look

Comment on lines 639 to 643
// 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());
Copy link
Contributor

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 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.
  2. I would also suggest adding a test in which opts has -Xmx but needs to be replaced by the autosizing config.

Copy link
Contributor

@abhishekshivanna abhishekshivanna left a 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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: typo tthat ake

Copy link
Contributor

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.

Comment on lines 613 to 617

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());
Copy link
Contributor

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).

@rmatharu-zz rmatharu-zz merged commit faf482e into apache:master Feb 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants