From d4992d532b6fe12bce6dd12f0559b9899a547337 Mon Sep 17 00:00:00 2001 From: Riza Suminto Date: Mon, 15 Dec 2025 09:38:56 -0800 Subject: [PATCH] Revert "IMPALA-14454: Exclude log4j 2 dependencies" This reverts commit 52b87fcefd26dbf6fea751378bd23e0fb7e0d18a. The original commit caused an issue when Impala is deployed together with Apache Atlas. Coordinator failed to start with error message: java.lang.NoClassDefFoundError: org/apache/logging/log4j/core/Layout Solved minor conflict in impala-config.sh due to IMPALA-14478 applied after IMPALA-14454. Change-Id: I77127db8d833c675c18c30eb3d6542ca906cd2a9 Reviewed-on: http://gerrit.cloudera.org:8080/23788 Reviewed-by: Michael Smith Tested-by: Impala Public Jenkins --- bin/impala-config.sh | 1 + fe/pom.xml | 22 +++++++++++++++------- java/executor-deps/pom.xml | 2 +- java/pom.xml | 12 ++++++++++++ 4 files changed, 29 insertions(+), 8 deletions(-) diff --git a/bin/impala-config.sh b/bin/impala-config.sh index 532735b8a..56aea598b 100755 --- a/bin/impala-config.sh +++ b/bin/impala-config.sh @@ -288,6 +288,7 @@ export IMPALA_JACKSON_DATABIND_VERSION=2.15.3 export IMPALA_JSON_SMART_VERSION=2.4.11 export IMPALA_JUNIT_VERSION=4.12 export IMPALA_KITE_VERSION=1.1.0 +export IMPALA_LOG4J2_VERSION=2.18.0 export IMPALA_PAC4J_VERSION=4.5.5 export IMPALA_RELOAD4j_VERSION=1.2.22 export IMPALA_SLF4J_VERSION=2.0.13 diff --git a/fe/pom.xml b/fe/pom.xml index 248ba8ce4..ee7fe44ae 100644 --- a/fe/pom.xml +++ b/fe/pom.xml @@ -375,13 +375,16 @@ under the License. * - log4j - log4j + org.apache.logging.log4j + log4j-slf4j-impl - org.apache.logging.log4j - * + log4j-1.2-api + + + log4j + log4j @@ -427,10 +430,14 @@ under the License. hive-standalone-metastore ${hive.version} - + org.apache.logging.log4j - * + log4j-slf4j-impl + + + org.apache.logging.log4j + log4j-1.2-api org.apache.hive @@ -912,7 +919,8 @@ under the License. org.apache.ant:* org.eclipse.jetty:* - org.apache.logging.log4j:* + org.apache.logging.log4j:log4j-slf4j-impl + org.apache.logging.log4j:log4j-1.2-api log4j:* org.slf4j:slf4j-log4j12 diff --git a/java/executor-deps/pom.xml b/java/executor-deps/pom.xml index eaace953f..1333d2abd 100644 --- a/java/executor-deps/pom.xml +++ b/java/executor-deps/pom.xml @@ -87,7 +87,7 @@ under the License. org.apache.logging.log4j - * + log4j-slf4j-impl diff --git a/java/pom.xml b/java/pom.xml index f9abb3b84..a85cd2db5 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -86,6 +86,7 @@ under the License. ${env.IMPALA_VELOCITY_ENGINE_CORE_VERSION} ${env.IMPALA_JSON_SMART_VERSION} ${env.IMPALA_DBCP2_VERSION} + ${env.IMPALA_LOG4J2_VERSION} ${env.IMPALA_DROPWIZARD_METRICS_VERSION} ${env.IMPALA_AIRCOMPRESSOR_VERSION} ${env.IMPALA_DATASKETCHES_VERSION} @@ -383,6 +384,17 @@ under the License. ${jackson.version} + + org.apache.logging.log4j + log4j-api + ${log4j2.version} + + + org.apache.logging.log4j + log4j-core + ${log4j2.version} + + org.apache.datasketches datasketches-java