Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mynameborat committed Nov 20, 2023
1 parent e247bad commit 740fd99
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ public Optional<String> getTaskOpts() {
return Optional.ofNullable(getFinalJvmOptions(taskOpts, autosizingContainerMaxHeap));
}

/**
* Returns the worker opts for the application if available.
*/
public Optional<String> getWorkerOpts() {
String autosizingWorkerHeapMb = get(JobConfig.JOB_AUTOSIZING_WORKER_MAX_HEAP_MB);
String workerOpts = get(ShellCommandConfig.WORKER_JVM_OPTS);
Expand All @@ -120,6 +123,9 @@ public Optional<String> getAdditionalClasspathDir() {
return Optional.ofNullable(get(ShellCommandConfig.ADDITIONAL_CLASSPATH_DIR));
}

/**
* Returns the final JVM options by applying the heap override if available to the jvm opts
*/
@VisibleForTesting
String getFinalJvmOptions(String jvmOpts, String maxHeapOverride) {
String finalJvmOpts = jvmOpts;
Expand Down

0 comments on commit 740fd99

Please sign in to comment.