Skip to content

HBASE-26616 Refactor code related to ZooKeeper authentication #3973

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

Merged
merged 2 commits into from
Jan 7, 2022

Conversation

ndimiduk
Copy link
Member

This refactor reduces the size and scope of the ZKUtil class. The core of this refactor is
moving the login* methods from ZKUtil into their own class, ZKAuthentication. The class
JaasConfiguration is also moved along with them.

@Apache-HBase

This comment has been minimized.

Copy link
Contributor

@Apache9 Apache9 left a comment

Choose a reason for hiding this comment

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

So is this related to how we want to implement tracing?

@ndimiduk
Copy link
Member Author

So is this related to how we want to implement tracing?

No sir. I have taken some time aside this week to learn a tool called Structure101, hoping that I can use it to find parts of our code that are unnecessarily complex, and untangle them. These two ZooKeeper -related refactors (and others, presuming i spend more time on it tomorrow) are not related to tracing, but to general improvement of the health and well-being of our source code.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

This refactor reduces the size and scope of the `ZKUtil` class. The core of this refactor is
moving the `login*` methods from `ZKUtil` into their own class, `ZKAuthentication`. The class
`JaasConfiguration` is also moved along with them.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
Signed-off-by: Duo Zhang <zhangduo@apache.org>
@ndimiduk ndimiduk force-pushed the 26616-refactor-zk-authentication branch from af857d1 to ea97e1e Compare January 5, 2022 19:11
@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 28s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s 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 16s Maven dependency ordering for branch
+1 💚 mvninstall 4m 19s master passed
+1 💚 compile 3m 55s master passed
+1 💚 checkstyle 1m 34s master passed
+1 💚 spotbugs 2m 53s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 15s Maven dependency ordering for patch
+1 💚 mvninstall 3m 50s the patch passed
+1 💚 compile 3m 43s the patch passed
+1 💚 javac 0m 30s hbase-zookeeper generated 0 new + 93 unchanged - 1 fixed = 93 total (was 94)
-0 ⚠️ javac 3m 13s hbase-server generated 4 new + 189 unchanged - 4 fixed = 193 total (was 193)
+1 💚 checkstyle 0m 14s hbase-zookeeper: The patch generated 0 new + 1 unchanged - 1 fixed = 1 total (was 2)
+1 💚 checkstyle 1m 3s The patch passed checkstyle in hbase-server
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 hadoopcheck 19m 32s Patch does not cause any errors with Hadoop 3.1.2 3.2.2 3.3.1.
+1 💚 spotbugs 3m 0s the patch passed
_ Other Tests _
+1 💚 asflicense 0m 28s The patch does not generate ASF License warnings.
54m 0s
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-3973/3/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #3973
Optional Tests dupname asflicense javac spotbugs hadoopcheck hbaseanti checkstyle compile
uname Linux f60c19882f86 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 / baeb51f
Default Java AdoptOpenJDK-1.8.0_282-b08
javac https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3973/3/artifact/yetus-general-check/output/diff-compile-javac-hbase-server.txt
Max. process+thread count 96 (vs. ulimit of 30000)
modules C: hbase-zookeeper hbase-server U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3973/3/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 0m 25s 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 15s Maven dependency ordering for branch
+1 💚 mvninstall 3m 51s master passed
+1 💚 compile 1m 22s master passed
+1 💚 shadedjars 8m 21s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 55s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 18s Maven dependency ordering for patch
+1 💚 mvninstall 3m 52s the patch passed
+1 💚 compile 1m 26s the patch passed
+1 💚 javac 1m 26s the patch passed
+1 💚 shadedjars 8m 17s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 55s the patch passed
_ Other Tests _
+1 💚 unit 0m 45s hbase-zookeeper in the patch passed.
+1 💚 unit 151m 21s hbase-server in the patch passed.
184m 22s
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-3973/3/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR #3973
Optional Tests javac javadoc unit shadedjars compile
uname Linux b8ff3cc62ed0 4.15.0-161-generic #169-Ubuntu SMP Fri Oct 15 13:41:54 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / baeb51f
Default Java AdoptOpenJDK-1.8.0_282-b08
Test Results https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3973/3/testReport/
Max. process+thread count 3892 (vs. ulimit of 30000)
modules C: hbase-zookeeper hbase-server U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3973/3/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 2s 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 13s Maven dependency ordering for branch
+1 💚 mvninstall 5m 4s master passed
+1 💚 compile 1m 42s master passed
+1 💚 shadedjars 9m 9s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 59s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 15s Maven dependency ordering for patch
+1 💚 mvninstall 5m 11s the patch passed
+1 💚 compile 1m 43s the patch passed
+1 💚 javac 1m 43s the patch passed
+1 💚 shadedjars 9m 12s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 59s the patch passed
_ Other Tests _
+1 💚 unit 0m 46s hbase-zookeeper in the patch passed.
-1 ❌ unit 206m 11s hbase-server in the patch failed.
244m 22s
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-3973/3/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #3973
Optional Tests javac javadoc unit shadedjars compile
uname Linux 702225de31e8 4.15.0-162-generic #170-Ubuntu SMP Mon Oct 18 11:38:05 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / baeb51f
Default Java AdoptOpenJDK-11.0.10+9
unit https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3973/3/artifact/yetus-jdk11-hadoop3-check/output/patch-unit-hbase-server.txt
Test Results https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3973/3/testReport/
Max. process+thread count 2559 (vs. ulimit of 30000)
modules C: hbase-zookeeper hbase-server U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-3973/3/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.

@ndimiduk
Copy link
Member Author

ndimiduk commented Jan 7, 2022

ErrorProne parsing is still broken -- those javac failures are in files I did not touch.

TestDrainReplicationQueuesForStandBy is flaky for me on master. It's failing at a rate of roughly 2 in 10 as of ce2bbaf30a.

@ndimiduk ndimiduk merged commit 5e263da into apache:master Jan 7, 2022
@ndimiduk ndimiduk deleted the 26616-refactor-zk-authentication branch January 7, 2022 01:04
@Apache9
Copy link
Contributor

Apache9 commented Jan 7, 2022

The error prone output is not very stable, so typically warnings should be fine, but if it fails the compilation then we still need to take care of it.

ndimiduk added a commit to ndimiduk/hbase that referenced this pull request Jan 7, 2022
…#3973)

This refactor reduces the size and scope of the `ZKUtil` class. The core of this refactor is
moving the `login*` methods from `ZKUtil` into their own class, `ZKAuthentication`. The class
`JaasConfiguration` is also moved along with them.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
Signed-off-by: Duo Zhang <zhangduo@apache.org>
ndimiduk added a commit that referenced this pull request Jan 10, 2022
This refactor reduces the size and scope of the `ZKUtil` class. The core of this refactor is
moving the `login*` methods from `ZKUtil` into their own class, `ZKAuthentication`. The class
`JaasConfiguration` is also moved along with them.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
Signed-off-by: Duo Zhang <zhangduo@apache.org>
ndimiduk added a commit to ndimiduk/hbase that referenced this pull request Jan 10, 2022
…#3973)

This refactor reduces the size and scope of the `ZKUtil` class. The core of this refactor is
moving the `login*` methods from `ZKUtil` into their own class, `ZKAuthentication`. The class
`JaasConfiguration` is also moved along with them.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
Signed-off-by: Duo Zhang <zhangduo@apache.org>
ndimiduk added a commit to ndimiduk/hbase that referenced this pull request Jan 10, 2022
…#3973)

This refactor reduces the size and scope of the `ZKUtil` class. The core of this refactor is
moving the `login*` methods from `ZKUtil` into their own class, `ZKAuthentication`. The class
`JaasConfiguration` is also moved along with them.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
Signed-off-by: Duo Zhang <zhangduo@apache.org>
ndimiduk added a commit that referenced this pull request Jan 11, 2022
This refactor reduces the size and scope of the `ZKUtil` class. The core of this refactor is
moving the `login*` methods from `ZKUtil` into their own class, `ZKAuthentication`. The class
`JaasConfiguration` is also moved along with them.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
Signed-off-by: Duo Zhang <zhangduo@apache.org>
ndimiduk added a commit that referenced this pull request Jan 11, 2022
This refactor reduces the size and scope of the `ZKUtil` class. The core of this refactor is
moving the `login*` methods from `ZKUtil` into their own class, `ZKAuthentication`. The class
`JaasConfiguration` is also moved along with them.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
Signed-off-by: Duo Zhang <zhangduo@apache.org>
vinayakphegde pushed a commit to vinayakphegde/hbase that referenced this pull request Apr 4, 2024
…#3973)

This refactor reduces the size and scope of the `ZKUtil` class. The core of this refactor is
moving the `login*` methods from `ZKUtil` into their own class, `ZKAuthentication`. The class
`JaasConfiguration` is also moved along with them.

Signed-off-by: Andrew Purtell <apurtell@apache.org>
Signed-off-by: Duo Zhang <zhangduo@apache.org>
(cherry picked from commit 87e0554)
Change-Id: I611fc4a3bcbcd31049449eb352550e6c5364b86c
Sign up for free to 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.

4 participants