This is an automated email from the ASF dual-hosted git repository.

dongjoon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/spark-kubernetes-operator.git


The following commit(s) were added to refs/heads/main by this push:
     new 7cb737f  [SPARK-52647] Fix `jvmArgs` to support multiple arguments
7cb737f is described below

commit 7cb737f188c28a850abc4e0d451782bf4eb4495d
Author: Dongjoon Hyun <dongj...@apache.org>
AuthorDate: Tue Jul 1 20:55:18 2025 -0700

    [SPARK-52647] Fix `jvmArgs` to support multiple arguments
    
    ### What changes were proposed in this pull request?
    
    This PR aims to fix `jvmArgs` parameter to support multiple arguments.
    
    
https://github.com/apache/spark-kubernetes-operator/blob/a50f4533225d5e2059796426cdfbdf25747dd56a/build-tools/helm/spark-kubernetes-operator/templates/spark-operator.yaml#L104-L105
    
    ### Why are the changes needed?
    
    The previous syntax, `"$OPERATOR_JAVA_OPTS"`, cannot handle multiple Java 
options.
    
    
https://github.com/apache/spark-kubernetes-operator/blob/a50f4533225d5e2059796426cdfbdf25747dd56a/build-tools/docker/docker-entrypoint.sh#L29
    
    ```
    $ cat test.sh
    OPERATOR_JAVA_OPTS="-Dfile.encoding=UTF8 -XX:+ExitOnOutOfMemoryError"
    exec java "$OPERATOR_JAVA_OPTS" -XX:+PrintFlagsFinal -version
    
    $ sh test.sh | grep ExitOnOutOfMemoryError
         bool ExitOnOutOfMemoryError                   = false                  
                   {product} {default}
    openjdk version "21.0.7" 2025-04-15
    OpenJDK Runtime Environment Homebrew (build 21.0.7)
    OpenJDK 64-Bit Server VM Homebrew (build 21.0.7, mixed mode, sharing)
    ```
    
    ### Does this PR introduce _any_ user-facing change?
    
    Yes. This is a bug fix.
    
    ### How was this patch tested?
    
    Manual review because JVM option check is a little tricky.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No.
    
    Closes #267 from dongjoon-hyun/SPARK-52647.
    
    Authored-by: Dongjoon Hyun <dongj...@apache.org>
    Signed-off-by: Dongjoon Hyun <dongj...@apache.org>
---
 build-tools/docker/docker-entrypoint.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build-tools/docker/docker-entrypoint.sh 
b/build-tools/docker/docker-entrypoint.sh
index 1397996..7fb8e40 100755
--- a/build-tools/docker/docker-entrypoint.sh
+++ b/build-tools/docker/docker-entrypoint.sh
@@ -26,7 +26,7 @@ if [ "$1" = "help" ]; then
 elif [ "$1" = "operator" ]; then
   echo "Starting Operator..."
 
-  exec java -cp "./$SPARK_OPERATOR_JAR" "$LOG_CONFIG" "$OPERATOR_JAVA_OPTS" 
org.apache.spark.k8s.operator.SparkOperator
+  exec java -cp "./$SPARK_OPERATOR_JAR" "$LOG_CONFIG" $OPERATOR_JAVA_OPTS 
org.apache.spark.k8s.operator.SparkOperator
 fi
 
 args=("${args[@]}")


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to