Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove log4j v1 jars from hive CLASSPATH #836

Merged
merged 1 commit into from
Mar 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading