From 740fd99d95fb2ca37f0fcb338b5d224f05ced7fe Mon Sep 17 00:00:00 2001 From: Bharath Kumarasubramanian Date: Mon, 20 Nov 2023 14:01:01 -0800 Subject: [PATCH] Address comments --- .../java/org/apache/samza/config/ShellCommandConfig.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/samza-core/src/main/java/org/apache/samza/config/ShellCommandConfig.java b/samza-core/src/main/java/org/apache/samza/config/ShellCommandConfig.java index 3cbbf0321f..90780c81db 100644 --- a/samza-core/src/main/java/org/apache/samza/config/ShellCommandConfig.java +++ b/samza-core/src/main/java/org/apache/samza/config/ShellCommandConfig.java @@ -106,6 +106,9 @@ public Optional getTaskOpts() { return Optional.ofNullable(getFinalJvmOptions(taskOpts, autosizingContainerMaxHeap)); } + /** + * Returns the worker opts for the application if available. + */ public Optional getWorkerOpts() { String autosizingWorkerHeapMb = get(JobConfig.JOB_AUTOSIZING_WORKER_MAX_HEAP_MB); String workerOpts = get(ShellCommandConfig.WORKER_JVM_OPTS); @@ -120,6 +123,9 @@ public Optional 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;