This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix.git
The following commit(s) were added to refs/heads/master by this push: new af11be2313 PHOENIX-7600 Replace commons-logging with slf4j (#2165) af11be2313 is described below commit af11be23136624a966c77532c5d91f033a62322e Author: Norbert Meszaros <meszinorbi2...@gmail.com> AuthorDate: Mon Jun 2 08:15:46 2025 +0200 PHOENIX-7600 Replace commons-logging with slf4j (#2165) --- bin/performance.py | 9 ++++++--- bin/phoenix_utils.py | 2 ++ phoenix-assembly/pom.xml | 4 ++++ .../build/components/all-common-dependencies.xml | 1 + phoenix-core-client/pom.xml | 4 ++++ phoenix-core/pom.xml | 8 ++++++++ phoenix-mapreduce-byo-shaded-hbase/pom.xml | 5 +++++ phoenix-server/pom.xml | 5 +++++ pom.xml | 23 ++++++++++++++++++++++ 9 files changed, 58 insertions(+), 3 deletions(-) diff --git a/bin/performance.py b/bin/performance.py index 23995354d1..74d5657026 100755 --- a/bin/performance.py +++ b/bin/performance.py @@ -67,16 +67,19 @@ java_cmd = phoenix_utils.java opts = os.getenv('PHOENIX_OPTS') or os.getenv('HBASE_OPTS') or '' -execute = ('%s %s ' + opts + ' -cp "%s%s%s%s%s"' + +execute = ('%s %s ' + opts + ' -cp "%s%s%s%s%s%s%s"' + ' -Djava.util.logging.config.class=org.apache.hadoop.hbase.logging.JulToSlf4jInitializer ' + ('' if '-Dlog4j2.configurationFile' in opts else ' -Dlog4j2.configurationFile=file:' + os.path.join(phoenix_utils.current_dir, "log4j2.properties")) + ' org.apache.phoenix.util.PhoenixRuntime -t %s %s ') % \ - (java_cmd, phoenix_utils.jvm_module_flags, hbase_config_path, os.pathsep, + (java_cmd, phoenix_utils.jvm_module_flags, + phoenix_utils.hbase_conf_dir, os.pathsep, phoenix_utils.slf4j_backend_jar, os.pathsep, - phoenix_utils.logging_jar, os.pathsep, phoenix_utils.phoenix_client_embedded_jar, + phoenix_utils.logging_jar, os.pathsep, + phoenix_utils.phoenix_client_embedded_jar, table, zookeeper) + # Create Table DDL createtable = "CREATE TABLE IF NOT EXISTS %s (HOST CHAR(2) NOT NULL,\ DOMAIN VARCHAR NOT NULL, FEATURE VARCHAR NOT NULL,DATE DATE NOT NULL,\ diff --git a/bin/phoenix_utils.py b/bin/phoenix_utils.py index e767c38a78..d3c39fc636 100755 --- a/bin/phoenix_utils.py +++ b/bin/phoenix_utils.py @@ -98,6 +98,7 @@ def setPath(): LOGGING_JAR_PATTERN2 = "log4j-api*.jar" LOGGING_JAR_PATTERN3 = "log4j-1.2-api*.jar" LOGGING_JAR_PATTERN4 = "jul-to-slf4j*.jar" + LOGGING_JAR_PATTERN5 = "jcl-over-slf4j*.jar" SQLLINE_WITH_DEPS_PATTERN = "sqlline-*-jar-with-dependencies.jar" @@ -212,6 +213,7 @@ def setPath(): logging_jar += ":"+findFileInPathWithoutRecursion(LOGGING_JAR_PATTERN2, os.path.join(current_dir, "..","lib")) logging_jar += ":"+findFileInPathWithoutRecursion(LOGGING_JAR_PATTERN3, os.path.join(current_dir, "..","lib")) logging_jar += ":"+findFileInPathWithoutRecursion(LOGGING_JAR_PATTERN4, os.path.join(current_dir, "..","lib")) + logging_jar += ":"+findFileInPathWithoutRecursion(LOGGING_JAR_PATTERN5, os.path.join(current_dir, "..","lib")) __read_hbase_env() __set_java() diff --git a/phoenix-assembly/pom.xml b/phoenix-assembly/pom.xml index 165a151cc3..a4362738ce 100644 --- a/phoenix-assembly/pom.xml +++ b/phoenix-assembly/pom.xml @@ -221,6 +221,10 @@ <groupId>org.slf4j</groupId> <artifactId>jul-to-slf4j</artifactId> </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>jcl-over-slf4j</artifactId> + </dependency> </dependencies> <profiles> diff --git a/phoenix-assembly/src/build/components/all-common-dependencies.xml b/phoenix-assembly/src/build/components/all-common-dependencies.xml index 68290829e7..ea0da732a1 100644 --- a/phoenix-assembly/src/build/components/all-common-dependencies.xml +++ b/phoenix-assembly/src/build/components/all-common-dependencies.xml @@ -25,6 +25,7 @@ <includes> <include>sqlline:sqlline:jar:jar-with-dependencies</include> <include>org.slf4j:jul-to-slf4j</include> + <include>org.slf4j:jcl-over-slf4j</include> <include>org.apache.logging.log4j:log4j-slf4j-impl</include> <include>org.apache.logging.log4j:log4j-api</include> <include>org.apache.logging.log4j:log4j-core</include> diff --git a/phoenix-core-client/pom.xml b/phoenix-core-client/pom.xml index 10b0710549..d95e78e51c 100644 --- a/phoenix-core-client/pom.xml +++ b/phoenix-core-client/pom.xml @@ -151,6 +151,10 @@ </goals> <configuration> <artifactItems> + <artifactItem> + <groupId>org.slf4j</groupId> + <artifactId>jcl-over-slf4j</artifactId> + </artifactItem> <artifactItem> <groupId>org.slf4j</groupId> <artifactId>jul-to-slf4j</artifactId> diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml index 4987d477c1..7ae481d294 100644 --- a/phoenix-core/pom.xml +++ b/phoenix-core/pom.xml @@ -108,6 +108,9 @@ <ignoredUnusedDeclaredDependency> org.slf4j:jul-to-slf4j </ignoredUnusedDeclaredDependency> + <ignoredUnusedDeclaredDependency> + org.slf4j:jcl-over-slf4j + </ignoredUnusedDeclaredDependency> </ignoredUnusedDeclaredDependencies> <ignoredUsedUndeclaredDependencies> </ignoredUsedUndeclaredDependencies> @@ -469,6 +472,11 @@ </dependency> <!-- logging --> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>jcl-over-slf4j</artifactId> + <scope>test</scope> + </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>jul-to-slf4j</artifactId> diff --git a/phoenix-mapreduce-byo-shaded-hbase/pom.xml b/phoenix-mapreduce-byo-shaded-hbase/pom.xml index 7a20de505b..d98b42160d 100644 --- a/phoenix-mapreduce-byo-shaded-hbase/pom.xml +++ b/phoenix-mapreduce-byo-shaded-hbase/pom.xml @@ -589,6 +589,11 @@ <artifactId>slf4j-api</artifactId> <scope>provided</scope> </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>jcl-over-slf4j</artifactId> + <scope>provided</scope> + </dependency> <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> diff --git a/phoenix-server/pom.xml b/phoenix-server/pom.xml index e6eb646633..f69047ce58 100644 --- a/phoenix-server/pom.xml +++ b/phoenix-server/pom.xml @@ -555,6 +555,11 @@ <artifactId>slf4j-api</artifactId> <scope>provided</scope> </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>jcl-over-slf4j</artifactId> + <scope>provided</scope> + </dependency> <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> diff --git a/pom.xml b/pom.xml index 82edabb5be..fbbce638d8 100644 --- a/pom.xml +++ b/pom.xml @@ -1034,6 +1034,10 @@ <groupId>commons-beanutils</groupId> <artifactId>commons-beanutils</artifactId> </exclusion> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> </exclusions> </dependency> <dependency> @@ -1067,6 +1071,10 @@ <groupId>commons-beanutils</groupId> <artifactId>commons-beanutils</artifactId> </exclusion> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> </exclusions> </dependency> <dependency> @@ -1422,6 +1430,12 @@ <groupId>org.apache.hbase</groupId> <artifactId>hbase-client</artifactId> <version>${hbase.version}</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>org.apache.hbase</groupId> @@ -1717,6 +1731,10 @@ <groupId>org.testng</groupId> <artifactId>testng</artifactId> </exclusion> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> </exclusions> </dependency> <dependency> @@ -1844,6 +1862,11 @@ <artifactId>slf4j-api</artifactId> <version>${slf4j.version}</version> </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>jcl-over-slf4j</artifactId> + <version>${slf4j.version}</version> + </dependency> <dependency> <groupId>org.apache.htrace</groupId> <artifactId>htrace-core</artifactId>