Skip to content

Commit

Permalink
[CELEBORN-762] Always set JVM opts -XX:+IgnoreUnrecognizedVMOptions
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?

Always set JVM opts `-XX:+IgnoreUnrecognizedVMOptions`

### Why are the changes needed?

By default, JVM failed to start when unknown opts are set, it's not friendly for users who want to use different versions of JDK.

### Does this PR introduce _any_ user-facing change?

Yes, users can success start celeborn even if they provide unknown JVM opts.

### How was this patch tested?

Review.

Closes #1676 from pan3793/CELEBORN-762.

Authored-by: Cheng Pan <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
  • Loading branch information
pan3793 committed Jul 4, 2023
1 parent 693172d commit de0fd8c
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bin/celeborn-class
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ fi
set +o posix
CMD=()
CMD+=("$JAVA")
CMD=(${CMD[@]} "$CELEBORN_JAVA_OPTS")
CMD=(${CMD[@]} "-XX:+IgnoreUnrecognizedVMOptions" "$CELEBORN_JAVA_OPTS")
CMD+=("-cp")
CMD+=("$CELEBORN_CLASSPATH")
CMD=(${CMD[@]} "$@")
Expand Down
2 changes: 1 addition & 1 deletion bin/celeborn-ratis
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function runJavaClass {
CLASS_ARGS+=("${arg}")
esac
done
"${JAVA}" -cp "${CLASSPATH}" ${CELEBORN_RATIS_SHELL_JAVA_OPTS} "${CLASS}" ${PARAMETER} "${CLASS_ARGS[@]}"
"${JAVA}" -cp "${CLASSPATH}" -XX:+IgnoreUnrecognizedVMOptions ${CELEBORN_RATIS_SHELL_JAVA_OPTS} "${CLASS}" ${PARAMETER} "${CLASS_ARGS[@]}"
}

function main {
Expand Down
1 change: 0 additions & 1 deletion sbin/restart-worker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ fi
CELEBORN_JAVA_OPTS="$CELEBORN_WORKER_JAVA_OPTS"
CELEBORN_JAVA_OPTS="$CELEBORN_JAVA_OPTS -Xmx$CELEBORN_WORKER_MEMORY"
CELEBORN_JAVA_OPTS="$CELEBORN_JAVA_OPTS -XX:MaxDirectMemorySize=$CELEBORN_WORKER_OFFHEAP_MEMORY"
CELEBORN_JAVA_OPTS="$CELEBORN_JAVA_OPTS -XX:+IgnoreUnrecognizedVMOptions"
CELEBORN_JAVA_OPTS="$CELEBORN_JAVA_OPTS -Dio.netty.tryReflectionSetAccessible=true"
CELEBORN_JAVA_OPTS="$CELEBORN_JAVA_OPTS --add-opens=java.base/jdk.internal.misc=ALL-UNNAMED"
CELEBORN_JAVA_OPTS="$CELEBORN_JAVA_OPTS --illegal-access=warn"
Expand Down
1 change: 0 additions & 1 deletion sbin/start-worker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ fi
CELEBORN_JAVA_OPTS="$CELEBORN_WORKER_JAVA_OPTS"
CELEBORN_JAVA_OPTS="$CELEBORN_JAVA_OPTS -Xmx$CELEBORN_WORKER_MEMORY"
CELEBORN_JAVA_OPTS="$CELEBORN_JAVA_OPTS -XX:MaxDirectMemorySize=$CELEBORN_WORKER_OFFHEAP_MEMORY"
CELEBORN_JAVA_OPTS="$CELEBORN_JAVA_OPTS -XX:+IgnoreUnrecognizedVMOptions"
CELEBORN_JAVA_OPTS="$CELEBORN_JAVA_OPTS -Dio.netty.tryReflectionSetAccessible=true"
CELEBORN_JAVA_OPTS="$CELEBORN_JAVA_OPTS --add-opens=java.base/jdk.internal.misc=ALL-UNNAMED"
CELEBORN_JAVA_OPTS="$CELEBORN_JAVA_OPTS --illegal-access=warn"
Expand Down

0 comments on commit de0fd8c

Please sign in to comment.