Skip to content

Commit

Permalink
fix: Remove log4j v1 jars from hive CLASSPATH
Browse files Browse the repository at this point in the history
  • Loading branch information
giem-git committed Mar 14, 2024
1 parent 5fb6890 commit 67c856e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions roles/hive/common/templates/hive-env.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,13 @@

export HADOOP_HOME={{ hadoop_home }}
export JAVA_HOME={{ java_home }}
export AUX_CLASSPATH="{{ tez_install_dir }}/*:{{ tez_install_dir }}/lib/*"

export AUX_CLASSPATH=""
for f in {{ tez_install_dir }}/*.jar {{ tez_install_dir }}/lib/*.jar; do
if [[ $f != *"log4j"* ]]; then
AUX_CLASSPATH=${AUX_CLASSPATH}:$f;
fi
done

export HADOOP_HEAPSIZE="{{ hive_default_heapsize }}"

Expand All @@ -67,7 +73,7 @@ if [ "$SERVICE" = "hiveserver2" ]; then
# Setting for HiveServer2 and Client
export HADOOP_HEAPSIZE="{{ hive_hs2_heapsize }}"
export HADOOP_LOGS_OPTS="-Dhive.log.dir={{ hive_log_dir }} -Dhive.log.file={{ hive_s2_log_file }} -Dhive.log.level={{ hive_root_logger_level }} -Dhive.root.logger={{ hive_root_logger }}"
export HADOOP_GC_OPTS="-Xloggc:{{ hive_log_dir }}/hiveserver2-gc-%t.log -XX:+UseG1GC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCCause -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=10M -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath={{ hive_log_dir }}/hs2_heapdump.hprof"
export HADOOP_GC_OPTS="-Xloggc:{{ hive_log_dir }}/hiveserver2-gc-%t.log -XX:+UseG1GC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCCause -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=10M -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath={{ hive_log_dir }}/hs2_heapdump.hprof"
export HADOOP_OPTS="$HADOOP_OPTS $JMX_OPTS ${HADOOP_LOGS_OPTS}"

fi
Expand Down

0 comments on commit 67c856e

Please sign in to comment.