hbase icon indicating copy to clipboard operation
hbase copied to clipboard

HBASE-29770 Exclude commons-logging from HBase

Open stoty opened this issue 3 weeks ago • 10 comments

stoty avatar Dec 11 '25 14:12 stoty

Since these libraries use commons-logging as their logging facade, excluding commons-logging may introduce troubles like ClassNotFoundException? And at least, we can not see the logs of these libraries?

Apache9 avatar Dec 11 '25 15:12 Apache9

:confetti_ball: +1 overall

Vote Subsystem Runtime Logfile Comment
+0 :ok: reexec 0m 40s Docker mode activated.
_ Prechecks _
+1 :green_heart: dupname 0m 0s No case conflicting files found.
+0 :ok: codespell 0m 0s codespell was not available.
+0 :ok: detsecrets 0m 0s detect-secrets was not available.
+1 :green_heart: @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
+1 :green_heart: mvninstall 4m 18s master passed
+1 :green_heart: compile 9m 59s master passed
+1 :green_heart: spotless 0m 55s branch has no errors when running spotless:check.
_ Patch Compile Tests _
+1 :green_heart: mvninstall 3m 40s the patch passed
+1 :green_heart: compile 10m 5s the patch passed
+1 :green_heart: javac 10m 5s the patch passed
+1 :green_heart: blanks 0m 0s The patch has no blanks issues.
+1 :green_heart: xmllint 0m 0s No new issues.
+1 :green_heart: hadoopcheck 12m 8s Patch does not cause any errors with Hadoop 3.3.6 3.4.1.
+1 :green_heart: spotless 0m 45s patch has no errors when running spotless:check.
_ Other Tests _
+1 :green_heart: asflicense 0m 14s The patch does not generate ASF License warnings.
50m 24s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7539/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR https://github.com/apache/hbase/pull/7539
Optional Tests dupname asflicense javac codespell detsecrets xmllint hadoopcheck spotless compile
uname Linux d8d8506db168 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / a134088461e9fd5b209df3ed31e3919dfbe0c9ce
Default Java Eclipse Adoptium-17.0.11+9
Max. process+thread count 194 (vs. ulimit of 30000)
modules C: . U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7539/1/console
versions git=2.34.1 maven=3.9.8 xmllint=20913
Powered by Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

Apache-HBase avatar Dec 11 '25 15:12 Apache-HBase

Since these libraries use commons-logging as their logging facade, excluding commons-logging may introduce troubles like ClassNotFoundException?

Not if the the jcl-over-slf4j jar is present on the classpath (which already is). The jcl-over-slf4j jar implements the commons-logging API.

We may have such problems if jcl-over-slf4j is omitted from the classpath.

The Hadoop-common dependency is actually via commons-configuration2, but we don't have that dependency, hence I added the exclusion a level higher.

And at least, we can not see the logs of these libraries?

In my experience commons-logging logs are usually lost, or end up in some unexpeced place because HBase does not include commons-logging configuration.

Using jcl-over-slf4j ensures that the commons-logging messages get piped into SLF4j and from there to Log4j2.

We've done the same in Phoenix some time ago, and tested that the commons-logging components' logs are logged via slf4j->log4j2 (there are very few, we had to work to trigger them)

stoty avatar Dec 11 '25 18:12 stoty

:broken_heart: -1 overall

Vote Subsystem Runtime Logfile Comment
+0 :ok: reexec 0m 33s Docker mode activated.
-0 :warning: yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 :green_heart: mvninstall 3m 48s master passed
+1 :green_heart: compile 2m 16s master passed
+1 :green_heart: javadoc 2m 1s master passed
+1 :green_heart: shadedjars 6m 16s branch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+1 :green_heart: mvninstall 3m 5s the patch passed
+1 :green_heart: compile 2m 18s the patch passed
+1 :green_heart: javac 2m 18s the patch passed
+1 :green_heart: javadoc 1m 59s the patch passed
+1 :green_heart: shadedjars 6m 9s patch has no errors when building our shaded downstream artifacts.
_ Other Tests _
-1 :x: unit 277m 19s /patch-unit-root.txt root in the patch failed.
313m 20s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7539/1/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR https://github.com/apache/hbase/pull/7539
Optional Tests javac javadoc unit shadedjars compile
uname Linux ecb4ba93ea41 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / a134088461e9fd5b209df3ed31e3919dfbe0c9ce
Default Java Eclipse Adoptium-17.0.11+9
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7539/1/testReport/
Max. process+thread count 7501 (vs. ulimit of 30000)
modules C: . U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7539/1/console
versions git=2.34.1 maven=3.9.8
Powered by Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

Apache-HBase avatar Dec 11 '25 20:12 Apache-HBase

:confetti_ball: +1 overall

Vote Subsystem Runtime Logfile Comment
+0 :ok: reexec 0m 27s Docker mode activated.
_ Prechecks _
+1 :green_heart: dupname 0m 0s No case conflicting files found.
+0 :ok: codespell 0m 0s codespell was not available.
+0 :ok: detsecrets 0m 0s detect-secrets was not available.
+1 :green_heart: @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
+0 :ok: mvndep 0m 28s Maven dependency ordering for branch
+1 :green_heart: mvninstall 3m 3s master passed
+1 :green_heart: compile 8m 33s master passed
+1 :green_heart: spotless 0m 45s branch has no errors when running spotless:check.
_ Patch Compile Tests _
+0 :ok: mvndep 0m 17s Maven dependency ordering for patch
+1 :green_heart: mvninstall 3m 0s the patch passed
+1 :green_heart: compile 8m 34s the patch passed
+1 :green_heart: javac 8m 34s the patch passed
+1 :green_heart: blanks 0m 0s The patch has no blanks issues.
+1 :green_heart: xmllint 0m 0s No new issues.
+1 :green_heart: hadoopcheck 11m 30s Patch does not cause any errors with Hadoop 3.3.6 3.4.1.
+1 :green_heart: spotless 0m 46s patch has no errors when running spotless:check.
_ Other Tests _
+1 :green_heart: asflicense 0m 20s The patch does not generate ASF License warnings.
45m 11s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7539/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR https://github.com/apache/hbase/pull/7539
Optional Tests dupname asflicense javac codespell detsecrets xmllint hadoopcheck spotless compile
uname Linux bde766358e98 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / fb26b343e2cba0ef689ff3d4da4feeed53b4ae36
Default Java Eclipse Adoptium-17.0.11+9
Max. process+thread count 190 (vs. ulimit of 30000)
modules C: hbase-diagnostics . U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7539/2/console
versions git=2.34.1 maven=3.9.8 xmllint=20913
Powered by Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

Apache-HBase avatar Dec 12 '25 08:12 Apache-HBase

:broken_heart: -1 overall

Vote Subsystem Runtime Logfile Comment
+0 :ok: reexec 0m 26s Docker mode activated.
-0 :warning: yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 :ok: mvndep 0m 23s Maven dependency ordering for branch
+1 :green_heart: mvninstall 3m 12s master passed
+1 :green_heart: compile 2m 8s master passed
+1 :green_heart: javadoc 2m 10s master passed
+1 :green_heart: shadedjars 6m 3s branch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+0 :ok: mvndep 0m 16s Maven dependency ordering for patch
+1 :green_heart: mvninstall 2m 54s the patch passed
+1 :green_heart: compile 2m 11s the patch passed
+1 :green_heart: javac 2m 11s the patch passed
+1 :green_heart: javadoc 2m 10s the patch passed
+1 :green_heart: shadedjars 5m 59s patch has no errors when building our shaded downstream artifacts.
_ Other Tests _
-1 :x: unit 263m 27s /patch-unit-root.txt root in the patch failed.
300m 38s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7539/2/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR https://github.com/apache/hbase/pull/7539
Optional Tests javac javadoc unit shadedjars compile
uname Linux 8b3c6857e3e8 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / fb26b343e2cba0ef689ff3d4da4feeed53b4ae36
Default Java Eclipse Adoptium-17.0.11+9
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7539/2/testReport/
Max. process+thread count 8570 (vs. ulimit of 30000)
modules C: hbase-diagnostics . U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7539/2/console
versions git=2.34.1 maven=3.9.8
Powered by Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

Apache-HBase avatar Dec 12 '25 13:12 Apache-HBase

Jcl-over-slf4j is just a commons-logging implementation based on slf4j, so we still need the commons-logging facade? IIRC, commons-logging is mostly like slf4j, usually you will use commons-logging and log4j together in the old time.

So what is the problem of commons-logging dependency here?

Apache9 avatar Dec 12 '25 15:12 Apache9

Ah, OK, checked the code, seems jcl-over-slf4j contains the class in commons-logging...

Apache9 avatar Dec 12 '25 15:12 Apache9

Better also ban commons-logging import in the maven enforcer plugin?

Apache9 avatar Dec 12 '25 15:12 Apache9

Better also ban commons-logging import in the maven enforcer plugin?

The commons-logging classes (along with log4j1 and log4j2 ) are already restricted.

stoty avatar Dec 13 '25 14:12 stoty