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

HBASE-26650 Create module hbase-client-test-support #4016

Conversation

ndimiduk
Copy link
Member

@ndimiduk ndimiduk commented Jan 6, 2022

Move SpanData matcher support classes to new module. Probably there are others, but start with these for now.

This is a prerequisite for further progress with the otel effort.

move SpanData matcher support classes to new module.
@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 27s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 1s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
+0 🆗 mvndep 0m 26s Maven dependency ordering for branch
+1 💚 mvninstall 4m 9s master passed
+1 💚 compile 8m 59s master passed
+1 💚 checkstyle 1m 57s master passed
+1 💚 spotbugs 11m 23s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 17s Maven dependency ordering for patch
+1 💚 mvninstall 3m 50s the patch passed
+1 💚 compile 9m 1s the patch passed
+1 💚 javac 9m 1s the patch passed
+1 💚 checkstyle 1m 55s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 xml 0m 4s The patch has no ill-formed XML file.
+1 💚 hadoopcheck 19m 28s Patch does not cause any errors with Hadoop 3.1.2 3.2.2 3.3.1.
+1 💚 spotbugs 12m 32s the patch passed
_ Other Tests _
+1 💚 asflicense 0m 45s The patch does not generate ASF License warnings.
84m 4s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-4016/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #4016
Optional Tests dupname asflicense javac hadoopcheck xml compile spotbugs hbaseanti checkstyle
uname Linux ee4df724f37a 4.15.0-156-generic #163-Ubuntu SMP Thu Aug 19 23:31:58 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 7972b2e
Default Java AdoptOpenJDK-1.8.0_282-b08
Max. process+thread count 141 (vs. ulimit of 30000)
modules C: hbase-client-test-support . hbase-client U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-4016/1/console
versions git=2.17.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 26s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗 mvndep 0m 26s Maven dependency ordering for branch
+1 💚 mvninstall 4m 51s master passed
+1 💚 compile 3m 21s master passed
+1 💚 shadedjars 8m 25s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 3m 25s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 17s Maven dependency ordering for patch
+1 💚 mvninstall 4m 46s the patch passed
+1 💚 compile 3m 27s the patch passed
+1 💚 javac 3m 27s the patch passed
+1 💚 shadedjars 8m 56s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 3m 47s the patch passed
_ Other Tests _
-1 ❌ unit 164m 20s root in the patch failed.
210m 19s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-4016/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #4016
Optional Tests javac javadoc unit shadedjars compile
uname Linux 61628ad517d1 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 7972b2e
Default Java AdoptOpenJDK-11.0.10+9
unit https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-4016/1/artifact/yetus-jdk11-hadoop3-check/output/patch-unit-root.txt
Test Results https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-4016/1/testReport/
Max. process+thread count 3563 (vs. ulimit of 30000)
modules C: hbase-client-test-support . hbase-client U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-4016/1/console
versions git=2.17.1 maven=3.6.3
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 26s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗 mvndep 0m 23s Maven dependency ordering for branch
+1 💚 mvninstall 4m 35s master passed
+1 💚 compile 3m 3s master passed
+1 💚 shadedjars 9m 9s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 2m 45s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 15s Maven dependency ordering for patch
+1 💚 mvninstall 4m 17s the patch passed
+1 💚 compile 3m 2s the patch passed
+1 💚 javac 3m 2s the patch passed
+1 💚 shadedjars 9m 15s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 2m 56s the patch passed
_ Other Tests _
+1 💚 unit 432m 15s root in the patch passed.
476m 33s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-4016/1/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR #4016
Optional Tests javac javadoc unit shadedjars compile
uname Linux 33ccb0d6ea08 4.15.0-163-generic #171-Ubuntu SMP Fri Nov 5 11:55:11 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 7972b2e
Default Java AdoptOpenJDK-1.8.0_282-b08
Test Results https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-4016/1/testReport/
Max. process+thread count 4412 (vs. ulimit of 30000)
modules C: hbase-client-test-support . hbase-client U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-4016/1/console
versions git=2.17.1 maven=3.6.3
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache9
Copy link
Contributor

Apache9 commented Jan 7, 2022

Why not just put them under hbase-client test code?

@ndimiduk
Copy link
Member Author

Why not just put them under hbase-client test code?

Because one test jar should not import another ; test jars should be leaf nodes in any dependency graph. I want to consume these classes from hbase-server:test:jar.

@Apache9
Copy link
Contributor

Apache9 commented Jan 11, 2022

Why not just put them under hbase-client test code?

Because one test jar should not import another ; test jars should be leaf nodes in any dependency graph. I want to consume these classes from hbase-server:test:jar.

Is this a best practice? At least in the current hbase code base, we need to depend on the test jar of some modules, for example HBaseTestingUtil is in hbase-server module, and we use it in hbase-mapreduce module.

You can check the pom definition, we have lots of tests jar dependencies…

@ndimiduk
Copy link
Member Author

Is this a best practice? At least in the current hbase code base, we need to depend on the test jar of some modules, for example HBaseTestingUtil is in hbase-server module, and we use it in hbase-mapreduce module.

You can check the pom definition, we have lots of tests jar dependencies…

The HBaseTestingUtility is an especially bad example, because it's how we suggest users test their HBase applications (I do see that on branch-2 it's marked as @deprecated, with no mention of a replacement). In that sense, it's a part of our public API that is provided by a test jar!

I think dependency on a test jar is bad practice and maven authors appear to agree -- you have to go out of your way to have maven produce test jars, they're disabled by default. However, I don't want to hold up the otel improvements on these kinds of layout/organization improvements to our repo.

@ndimiduk ndimiduk closed this Jan 12, 2022
@ndimiduk ndimiduk deleted the 26650-create-module-hbase-client-test-support branch January 12, 2022 20:34
@ndimiduk
Copy link
Member Author

I have stumbled into one annoyance -- when a dependency jar is of type:test-jar, it seems that the transitive dependencies are not included. So for example, say I want to use the OpenTelemetryClassRule and OpenTelemetryTestRule defined in hbase-server:test from hbase-endpoint:test. These rules use classes from io.opentelemetry:opentelemetry-sdk-testing. This transitive dependency is not included automatically -- hbase-endpoint:test must explicitly include both hbase-server:test and io.opentelemetry:opentelemetry-sdk-testing, otherwise a NoClassDefFoundError is thrown at test time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants