Skip to content
Draft
Show file tree
Hide file tree
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
6 changes: 5 additions & 1 deletion beeline/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,11 @@
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<artifactId>log4j-slf4j2-impl</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
</dependency>
<!-- test intra-project -->
<dependency>
Expand Down
55 changes: 55 additions & 0 deletions bin/ext/util/execHiveCmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,61 @@ execHiveCmd () {
HIVE_LIB=`cygpath -w "$HIVE_LIB"`
fi

# For services that may encounter SLF4J conflicts (schemaTool, schematool, beeline),
# filter out old SLF4J 1.x jars from HADOOP_CLASSPATH to prevent binding conflicts
if [[ "$SERVICE" =~ ^(schemaTool|schematool|beeline)$ ]]; then
# [FIX]: Prefer packaged Hive configs first so CI does not depend on host /etc/hive content.
if [ -f "${HIVE_HOME}/conf/hive-log4j2.properties" ]; then
export HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -Dlog4j2.configurationFile=file://${HIVE_HOME}/conf/hive-log4j2.properties"
# Packaged dist may only ship the template; materialize a .properties file so Log4j2
# selects the PropertiesConfiguration parser (it infers parser from filename extension).
elif [ -f "${HIVE_HOME}/conf/hive-log4j2.properties.template" ]; then
HIVE_LOG4J2_DIR="$(mktemp -d -t hive-log4j2.XXXXXX)"
HIVE_LOG4J2_FILE="${HIVE_LOG4J2_DIR}/hive-log4j2.properties"
cp "${HIVE_HOME}/conf/hive-log4j2.properties.template" "${HIVE_LOG4J2_FILE}"
export HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -Dlog4j2.configurationFile=file://${HIVE_LOG4J2_FILE}"
# Only fall back to system default if packaged configs are missing
elif [ -f "${HIVE_CONF_DIR}/hive-log4j2.properties" ]; then
export HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -Dlog4j2.configurationFile=file://${HIVE_CONF_DIR}/hive-log4j2.properties"
fi

# Prevent Log4j2 from being reconfigured after initialization
export HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -Dlog4j2.disableShutdownHook=true"
export HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -Dlog4j.shutdownHookEnabled=false"

# CRITICAL: Tell Hadoop to load Hive's jars FIRST, overriding globally-installed
# Hadoop/Tez jars that contain old SLF4J 1.x bindings. This prevents the multiple
# SLF4J binding conflict seen in CI environments.
export HADOOP_USER_CLASSPATH_FIRST=true

# Filter HADOOP_CLASSPATH to remove paths with old SLF4J/log4j bindings
if [ "$HADOOP_CLASSPATH" != "" ]; then
FILTERED_CP=""
IFS=':' read -ra CP_ARRAY <<< "$HADOOP_CLASSPATH"
for cp_entry in "${CP_ARRAY[@]}"; do
# Skip only specific SLF4J 1.x binding jars by filename
if [[ "$(basename "$cp_entry")" == slf4j-log4j12-*.jar || \
"$(basename "$cp_entry")" == slf4j-reload4j-*.jar || \
"$(basename "$cp_entry")" == log4j-slf4j-impl-*.jar || \
"$(basename "$cp_entry")" == reload4j-*.jar ]]; then
continue
fi
# Skip explicit SLF4J 1.x jar paths and reload4j
if [[ "$cp_entry" == *slf4j-log4j12* || \
"$cp_entry" == *slf4j-reload4j* || \
"$cp_entry" == */reload4j-* ]]; then
continue
fi
if [ "$FILTERED_CP" == "" ]; then
FILTERED_CP="$cp_entry"
else
FILTERED_CP="${FILTERED_CP}:${cp_entry}"
fi
done
export HADOOP_CLASSPATH="$FILTERED_CP"
fi
fi

# hadoop 20 or newer - skip the aux_jars option. picked up from hiveconf
exec $HADOOP jar ${HIVE_LIB}/$JAR $CLASS $HIVE_OPTS "$@"
}
Empty file modified bin/schematool
100644 → 100755
Empty file.
6 changes: 5 additions & 1 deletion common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,11 @@
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<artifactId>log4j-slf4j2-impl</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
Expand Down
4 changes: 4 additions & 0 deletions druid-handler/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.druid</groupId>
<artifactId>druid-aws-common</artifactId>
Expand Down
54 changes: 54 additions & 0 deletions hcatalog/webhcat/svr/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@
<artifactId>jul-to-slf4j</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j2-impl</artifactId>
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-jdbc</artifactId>
Expand Down Expand Up @@ -179,6 +183,22 @@
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
</exclusion>
<exclusion>
<groupId>ch.qos.reload4j</groupId>
<artifactId>reload4j</artifactId>
</exclusion>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand All @@ -193,11 +213,45 @@
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
</exclusion>
<exclusion>
<groupId>ch.qos.reload4j</groupId>
<artifactId>reload4j</artifactId>
</exclusion>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-mapreduce-client-core</artifactId>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
</exclusion>
<exclusion>
<groupId>ch.qos.reload4j</groupId>
<artifactId>reload4j</artifactId>
</exclusion>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
Expand Down
18 changes: 18 additions & 0 deletions iceberg/iceberg-catalog/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-iceberg-shading</artifactId>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.avro</groupId>
Expand All @@ -48,12 +54,24 @@
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- test dependencies -->
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-hdfs</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
Expand Down
18 changes: 18 additions & 0 deletions iceberg/iceberg-handler/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,22 @@
<groupId>org.apache.hive</groupId>
<artifactId>hive-iceberg-catalog</artifactId>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>
Expand Down Expand Up @@ -107,6 +119,12 @@
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-hdfs</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
Expand Down
18 changes: 18 additions & 0 deletions iceberg/iceberg-shading/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,34 @@
<groupId>org.apache.iceberg</groupId>
<artifactId>iceberg-data</artifactId>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.iceberg</groupId>
<artifactId>iceberg-parquet</artifactId>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.iceberg</groupId>
<artifactId>iceberg-orc</artifactId>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<profiles>
Expand Down
40 changes: 40 additions & 0 deletions iceberg/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,26 +74,56 @@
<groupId>org.apache.iceberg</groupId>
<artifactId>iceberg-api</artifactId>
<version>${iceberg.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.iceberg</groupId>
<artifactId>iceberg-core</artifactId>
<version>${iceberg.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.iceberg</groupId>
<artifactId>iceberg-data</artifactId>
<version>${iceberg.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.iceberg</groupId>
<artifactId>iceberg-parquet</artifactId>
<version>${iceberg.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.iceberg</groupId>
<artifactId>iceberg-orc</artifactId>
<version>${iceberg.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>
Expand Down Expand Up @@ -159,6 +189,10 @@
<groupId>org.apache.avro</groupId>
<artifactId>avro</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down Expand Up @@ -195,6 +229,12 @@
<artifactId>iceberg-core</artifactId>
<classifier>tests</classifier>
<version>${iceberg.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
Expand Down
1 change: 0 additions & 1 deletion itests/qtest-druid/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
<druid.guava.version>16.0.1</druid.guava.version>
<druid.guice.version>4.1.0</druid.guice.version>
<druid.guice.version>4.1.0</druid.guice.version>
<slf4j.version>1.7.30</slf4j.version>
</properties>
<dependencies>
<dependency>
Expand Down
1 change: 0 additions & 1 deletion itests/qtest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
<clustermode/>
<execute.beeline.tests>false</execute.beeline.tests>
<test.dfs.mkdir>-mkdir -p</test.dfs.mkdir>
<slf4j.version>1.7.30</slf4j.version>
</properties>
<dependencies>
<!-- dependencies are always listed in sorted order by groupId, artifactId -->
Expand Down
Loading