Skip to content

HBASE-26240 Set InterfaceAudience to Private for BalanceRequest$Builder - #3663

Merged
ndimiduk merged 1 commit into
apache:masterfrom
bbeaudreault:balance_request_ia
Sep 9, 2021
Merged

HBASE-26240 Set InterfaceAudience to Private for BalanceRequest$Builder#3663
ndimiduk merged 1 commit into
apache:masterfrom
bbeaudreault:balance_request_ia

Conversation

@bbeaudreault

Copy link
Copy Markdown
Contributor

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec6m 23sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚mvninstall4m 24smaster passed
+1 💚compile0m 27smaster passed
+1 💚shadedjars9m 0sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 23smaster passed
_ Patch Compile Tests _
+1 💚mvninstall4m 10sthe patch passed
+1 💚compile0m 25sthe patch passed
+1 💚javac0m 25sthe patch passed
+1 💚shadedjars9m 4spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 21sthe patch passed
_ Other Tests _
+1 💚unit1m 40shbase-client in the patch passed.
37m 32s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3663/1/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR#3663
Optional Testsjavac javadoc unit shadedjars compile
unameLinux f4e6f86213d4 4.15.0-147-generic #151-Ubuntu SMP Fri Jun 18 19:21:19 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / afbdd41
Default JavaAdoptOpenJDK-1.8.0_282-b08
Test Resultshttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3663/1/testReport/
Max. process+thread count221 (vs. ulimit of 30000)
modulesC: hbase-client U: hbase-client
Console outputhttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3663/1/console
versionsgit=2.17.1 maven=3.6.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec7m 18sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚mvninstall5m 2smaster passed
+1 💚compile0m 31smaster passed
+1 💚shadedjars9m 10sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 27smaster passed
_ Patch Compile Tests _
+1 💚mvninstall4m 43sthe patch passed
+1 💚compile0m 30sthe patch passed
+1 💚javac0m 30sthe patch passed
+1 💚shadedjars9m 5spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 26sthe patch passed
_ Other Tests _
+1 💚unit1m 44shbase-client in the patch passed.
40m 11s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3663/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#3663
Optional Testsjavac javadoc unit shadedjars compile
unameLinux d97f7d2698b0 4.15.0-143-generic #147-Ubuntu SMP Wed Apr 14 16:10:11 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / afbdd41
Default JavaAdoptOpenJDK-11.0.10+9
Test Resultshttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3663/1/testReport/
Max. process+thread count212 (vs. ulimit of 30000)
modulesC: hbase-client U: hbase-client
Console outputhttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3663/1/console
versionsgit=2.17.1 maven=3.6.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 30sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
_ master Compile Tests _
+1 💚mvninstall4m 2smaster passed
+1 💚compile0m 59smaster passed
+1 💚checkstyle0m 27smaster passed
+1 💚spotbugs1m 4smaster passed
_ Patch Compile Tests _
+1 💚mvninstall3m 39sthe patch passed
+1 💚compile1m 1sthe patch passed
+1 💚javac1m 1sthe patch passed
+1 💚checkstyle0m 26sthe patch passed
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚hadoopcheck20m 13sPatch does not cause any errors with Hadoop 3.1.2 3.2.1 3.3.0.
+1 💚spotbugs1m 37sthe patch passed
_ Other Tests _
+1 💚asflicense0m 15sThe patch does not generate ASF License warnings.
44m 20s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3663/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#3663
Optional Testsdupname asflicense javac spotbugs hadoopcheck hbaseanti checkstyle compile
unameLinux 61e2e4d12543 4.15.0-136-generic #140-Ubuntu SMP Thu Jan 28 05:20:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / afbdd41
Default JavaAdoptOpenJDK-1.8.0_282-b08
Max. process+thread count96 (vs. ulimit of 30000)
modulesC: hbase-client U: hbase-client
Console outputhttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3663/1/console
versionsgit=2.17.1 maven=3.6.3 spotbugs=4.2.2
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 7sDocker mode activated.
-0 ⚠️yetus0m 2sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚mvninstall4m 23smaster passed
+1 💚compile0m 26smaster passed
+1 💚shadedjars9m 6sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 24smaster passed
_ Patch Compile Tests _
+1 💚mvninstall4m 6sthe patch passed
+1 💚compile0m 26sthe patch passed
+1 💚javac0m 26sthe patch passed
+1 💚shadedjars9m 11spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 21sthe patch passed
_ Other Tests _
+1 💚unit1m 39shbase-client in the patch passed.
32m 25s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3663/2/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR#3663
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 6feea6c3e431 4.15.0-147-generic #151-Ubuntu SMP Fri Jun 18 19:21:19 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / afbdd41
Default JavaAdoptOpenJDK-1.8.0_282-b08
Test Resultshttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3663/2/testReport/
Max. process+thread count227 (vs. ulimit of 30000)
modulesC: hbase-client U: hbase-client
Console outputhttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3663/2/console
versionsgit=2.17.1 maven=3.6.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 7sDocker mode activated.
-0 ⚠️yetus0m 2sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚mvninstall5m 6smaster passed
+1 💚compile0m 31smaster passed
+1 💚shadedjars9m 7sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 27smaster passed
_ Patch Compile Tests _
+1 💚mvninstall4m 50sthe patch passed
+1 💚compile0m 31sthe patch passed
+1 💚javac0m 31sthe patch passed
+1 💚shadedjars9m 3spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 26sthe patch passed
_ Other Tests _
+1 💚unit1m 43shbase-client in the patch passed.
34m 7s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3663/2/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#3663
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 79357b691aa7 4.15.0-143-generic #147-Ubuntu SMP Wed Apr 14 16:10:11 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / afbdd41
Default JavaAdoptOpenJDK-11.0.10+9
Test Resultshttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3663/2/testReport/
Max. process+thread count222 (vs. ulimit of 30000)
modulesC: hbase-client U: hbase-client
Console outputhttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3663/2/console
versionsgit=2.17.1 maven=3.6.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 46sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
_ master Compile Tests _
+1 💚mvninstall4m 53smaster passed
+1 💚compile1m 11smaster passed
+1 💚checkstyle0m 32smaster passed
+1 💚spotbugs1m 15smaster passed
_ Patch Compile Tests _
+1 💚mvninstall4m 47sthe patch passed
+1 💚compile1m 11sthe patch passed
+1 💚javac1m 12sthe patch passed
+1 💚checkstyle0m 32sthe patch passed
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚hadoopcheck25m 11sPatch does not cause any errors with Hadoop 3.1.2 3.2.1 3.3.0.
+1 💚spotbugs1m 28sthe patch passed
_ Other Tests _
+1 💚asflicense0m 14sThe patch does not generate ASF License warnings.
52m 52s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3663/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#3663
Optional Testsdupname asflicense javac spotbugs hadoopcheck hbaseanti checkstyle compile
unameLinux c54850f41a7e 4.15.0-136-generic #140-Ubuntu SMP Thu Jan 28 05:20:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / afbdd41
Default JavaAdoptOpenJDK-1.8.0_282-b08
Max. process+thread count96 (vs. ulimit of 30000)
modulesC: hbase-client U: hbase-client
Console outputhttps://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3663/2/console
versionsgit=2.17.1 maven=3.6.3 spotbugs=4.2.2
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@ndimiduk

Copy link
Copy Markdown
Member

Sorry to nit-pick, but if the build is explicitly private API, can it be its own top-level class, rather than being an inner class of the public API? I think it's confusing to downstream developers when we inter-mingle public and private API resources in the same class.

otherwise, +1

@bbeaudreault

Copy link
Copy Markdown
ContributorAuthor

@ndimiduk I hear you, but honestly I feel like there are pros and cons on both sides of that. If I break it out, I'd need to make BalanceResponse's constructor package-private at least, and the org.apache.hadoop.hbase.client package is quite large. I'd probably also get rid of the convenience BalanceResponse.newBuilder() since putting that in BalanceResponseBuilder would be sort of redundant. So we'd change the access pattern to new BalanceResponseBuilder().build(). Not a huge deal, but it's less intuitive and now there's an asymmetry with BalanceRequest. I could do the same with BalanceRequest, but that's just expanding non-intuitiveness. I could leave the asymmetry, but I do think there's some value there and I feel like inner Builder classes are sort of conventional.

None of that is a non-starter, but I'm not sure if it's explicitly better than having the inner class be IA.Private, or even IA.Public. I can do it if you feel strongly about it, but just wanted to put that out there for consideration.

@ndimidukndimiduk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the context and your thinking here, @bbeaudreault . I feel strongly about it, but in the larger context. This is exactly the kind of improvement that we might one-day pursue. In the mean time, let's go forward with what you have presented here.

@ndimiduk
ndimiduk merged commit 8679e08 into apache:masterSep 9, 2021
ndimiduk pushed a commit to ndimiduk/hbase that referenced this pull request Sep 9, 2021
…er (apache#3663)
Signed-off-by: Duo Zhang <zhangduo@apache.org>
Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
@bbeaudreault
bbeaudreault deleted the balance_request_ia branch September 9, 2021 18:03
ndimiduk pushed a commit that referenced this pull request Sep 9, 2021
…er (#3663)
Signed-off-by: Duo Zhang <zhangduo@apache.org>
Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
@joshelser

Copy link
Copy Markdown
Member

Sorry for the belated reply. @bbeaudreaultmy ask was to move BalanceResponse$Builder to be private, not BalanceRequest$Builder to be private. Users are expected to be able to use BalancerRequest, as this is on Admin#balance(BalanceRequest).

BalanceResponsebalance(BalanceRequestrequest) throwsIOException;

My point was that the Master is the only thing which should be creating BalanceResponse objects, thus end users don't need to know about the BalanceResponse$Builder class. Because the constructors on BalanceRequest are private, users must use the Builder class.

ObjectClient Visibility
BalanceRequestPublic
BalanceRequest$BuilderPublic
BalanceResponsePublic
BalanceResponse$BuilderPrivate

Please correct me if I'm wrong. I think we want to revert the change to BalancerRequest$Builder and apply it to BalancerRespons$Builder instead.

@Apache9

Copy link
Copy Markdown
Contributor

Oh, thanks @joshelser for pointing this out.

The IA.Private class should be BalanceResponse, not BalanceRequest...

@bbeaudreault

Copy link
Copy Markdown
ContributorAuthor

Ugh! You are right, I totally messed that up. I'll push a fix tomorrow. Sorry all

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@bbeaudreault@Apache-HBase@ndimiduk@joshelser@Apache9