From fb9f5cdcb48ab4ab8c3e309395440bc31152cb0b Mon Sep 17 00:00:00 2001 From: Bharath Kumarasubramanian Date: Mon, 22 Jan 2024 13:36:41 -0800 Subject: [PATCH] SAMZA-2799: Remove worker.opts handling in shell command builder (#1696) --- .../src/main/java/org/apache/samza/job/ShellCommandBuilder.java | 2 -- .../test/java/org/apache/samza/job/TestShellCommandBuilder.java | 2 -- 2 files changed, 4 deletions(-) diff --git a/samza-core/src/main/java/org/apache/samza/job/ShellCommandBuilder.java b/samza-core/src/main/java/org/apache/samza/job/ShellCommandBuilder.java index 4262145eef..37253442a4 100644 --- a/samza-core/src/main/java/org/apache/samza/job/ShellCommandBuilder.java +++ b/samza-core/src/main/java/org/apache/samza/job/ShellCommandBuilder.java @@ -46,8 +46,6 @@ public Map buildEnvironment() { envBuilder.put(ShellCommandConfig.ENV_JAVA_OPTS, shellCommandConfig.getTaskOpts().orElse("")); envBuilder.put(ShellCommandConfig.ENV_ADDITIONAL_CLASSPATH_DIR, shellCommandConfig.getAdditionalClasspathDir().orElse("")); - shellCommandConfig.getWorkerOpts() - .ifPresent(workerOpts -> envBuilder.put(ShellCommandConfig.WORKER_JVM_OPTS, workerOpts)); shellCommandConfig.getJavaHome().ifPresent(javaHome -> envBuilder.put(ShellCommandConfig.ENV_JAVA_HOME, javaHome)); return envBuilder.build(); } diff --git a/samza-core/src/test/java/org/apache/samza/job/TestShellCommandBuilder.java b/samza-core/src/test/java/org/apache/samza/job/TestShellCommandBuilder.java index 4acba9487c..ca7be0e4a3 100644 --- a/samza-core/src/test/java/org/apache/samza/job/TestShellCommandBuilder.java +++ b/samza-core/src/test/java/org/apache/samza/job/TestShellCommandBuilder.java @@ -60,7 +60,6 @@ public void testBuildEnvironment() throws MalformedURLException { Config config = new MapConfig(new ImmutableMap.Builder() .put(ShellCommandConfig.COMMAND_SHELL_EXECUTE, "foo") .put(ShellCommandConfig.TASK_JVM_OPTS, "-Xmx4g") - .put(ShellCommandConfig.WORKER_JVM_OPTS, "-Xmx2g") .put(ShellCommandConfig.ADDITIONAL_CLASSPATH_DIR, "/path/to/additional/classpath") .put(ShellCommandConfig.TASK_JAVA_HOME, "/path/to/java/home") .build()); @@ -72,7 +71,6 @@ public void testBuildEnvironment() throws MalformedURLException { .put(ShellCommandConfig.ENV_CONTAINER_ID, "1") .put(ShellCommandConfig.ENV_COORDINATOR_URL, URL_STRING) .put(ShellCommandConfig.ENV_JAVA_OPTS, "-Xmx4g") - .put(ShellCommandConfig.WORKER_JVM_OPTS, "-Xmx2g") .put(ShellCommandConfig.ENV_ADDITIONAL_CLASSPATH_DIR, "/path/to/additional/classpath") .put(ShellCommandConfig.ENV_JAVA_HOME, "/path/to/java/home") .build();