Skip to content

Commit

Permalink
MapR [SPARK-1188] [Java 17] Need to open java.lang module for Spark H…
Browse files Browse the repository at this point in the history
…S, Spark Master and Spark Workers (apache#1093)

Co-authored-by: Egor Krivokon <>
  • Loading branch information
ekrivokonmapr committed Nov 6, 2023
1 parent 5a1def2 commit ca8d859
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions conf/spark-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,19 @@ export SPARK_WORKER_DIR=$SPARK_HOME/tmp

# FIPS
if [ "$FIPS_ENABLED" = "1" ]; then
SPARK_WORKER_OPTS="$SPARK_WORKER_OPTS -Djava.security.properties=/opt/mapr/conf/java.security.fips"
SPARK_HISTORY_OPTS="$SPARK_HISTORY_OPTS -Djava.security.properties=/opt/mapr/conf/java.security.fips"
SPARK_MASTER_OPTS="$SPARK_MASTER_OPTS -Djava.security.properties=/opt/mapr/conf/java.security.fips"
SPARK_SUBMIT_OPTS="$SPARK_SUBMIT_OPTS -Djava.security.properties=/opt/mapr/conf/java.security.fips"
SPARK_WORKER_OPTS="$SPARK_WORKER_OPTS -Djava.security.properties=/opt/mapr/conf/java.security.fips"
SPARK_HISTORY_OPTS="$SPARK_HISTORY_OPTS -Djava.security.properties=/opt/mapr/conf/java.security.fips"
SPARK_MASTER_OPTS="$SPARK_MASTER_OPTS -Djava.security.properties=/opt/mapr/conf/java.security.fips"
SPARK_SUBMIT_OPTS="$SPARK_SUBMIT_OPTS -Djava.security.properties=/opt/mapr/conf/java.security.fips"
fi

# Spark services and JDK 17 compatbility
SPARK_WORKER_OPTS="$SPARK_WORKER_OPTS --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED"
SPARK_HISTORY_OPTS="$SPARK_HISTORY_OPTS --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED"
SPARK_MASTER_OPTS="$SPARK_MASTER_OPTS --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED"



#UI
export SPARK_SUBMIT_OPTS="$SPARK_SUBMIT_OPTS -Djava.library.path=$SPARK_MAPR_HOME/lib:$HADOOP_HOME/lib/native"
export SPARK_HISTORY_OPTS="$SPARK_HISTORY_OPTS -Djava.library.path=$SPARK_MAPR_HOME/lib"
Expand Down

0 comments on commit ca8d859

Please sign in to comment.