Skip to content

HBASE-29155 Use Java 8-compatible instanceOf syntax in ReplicaKey - #6729

Closed
PDavid wants to merge 1 commit into
apache:masterfrom
PDavid:HBASE-29155-fix-checkstyle
Closed

HBASE-29155 Use Java 8-compatible instanceOf syntax in ReplicaKey#6729
PDavid wants to merge 1 commit into
apache:masterfrom
PDavid:HBASE-29155-fix-checkstyle

Conversation

@PDavid

Copy link
Copy Markdown
Contributor

The website build failed with the following error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.12.0:site (default-site) on project hbase: Error generating maven-checkstyle-plugin:3.1.0:checkstyle-aggregate report: Failed during checkstyle configuration: Exception was thrown while processing hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/replicas/ReplicaKey.java: IllegalStateException occurred while parsing file hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/replicas/ReplicaKey.java. hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/replicas/ReplicaKey.java:43:35: expecting RPAREN, found 'other' -> [Help 1]

Checkstyle is not able to parse ReplicaKey.java (because of instanceOf pattern match syntax).

We have a rule to not use Java11+ grammar on branch-3 as long as we still need to support Java 8 on branch-2.x.

The website build failed with the following error:
```
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.12.0:site (default-site) on project hbase: Error generating maven-checkstyle-plugin:3.1.0:checkstyle-aggregate report: Failed during checkstyle configuration: Exception was thrown while processing hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/replicas/ReplicaKey.java: IllegalStateException occurred while parsing file hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/replicas/ReplicaKey.java. hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/replicas/ReplicaKey.java:43:35: expecting RPAREN, found 'other' -> [Help 1]
```
Checkstyle is not able to parse ReplicaKey.java (because of instanceOf pattern match syntax).
We have a rule to not use Java11+ grammar on branch-3 as long as we still need to support Java 8 on branch-2.x.
@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 29sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+0 🆗codespell0m 0scodespell was not available.
+0 🆗detsecrets0m 0sdetect-secrets was not available.
+1 💚@author0m 0sThe patch does not contain any @author tags.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
_ master Compile Tests _
+1 💚mvninstall3m 16smaster passed
+1 💚compile0m 30smaster passed
-0 ⚠️checkstyle0m 9s/buildtool-branch-checkstyle-hbase-balancer.txtThe patch fails to run checkstyle in hbase-balancer
+1 💚spotbugs0m 29smaster passed
+1 💚spotless0m 51sbranch has no errors when running spotless:check.
_ Patch Compile Tests _
+1 💚mvninstall3m 18sthe patch passed
+1 💚compile0m 26sthe patch passed
+1 💚javac0m 26sthe patch passed
+1 💚blanks0m 0sThe patch has no blanks issues.
+1 💚checkstyle0m 9sthe patch passed
+1 💚spotbugs0m 29sthe patch passed
+1 💚hadoopcheck11m 43sPatch does not cause any errors with Hadoop 3.3.6 3.4.0.
+1 💚spotless0m 44spatch has no errors when running spotless:check.
_ Other Tests _
+1 💚asflicense0m 10sThe patch does not generate ASF License warnings.
30m 13s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6729/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#6729
Optional Testsdupname asflicense javac spotbugs checkstyle codespell detsecrets compile hadoopcheck hbaseanti spotless
unameLinux 66a8d4e6cbcd 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 toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / eb67f23
Default JavaEclipse Adoptium-17.0.11+9
Max. process+thread count83 (vs. ulimit of 30000)
modulesC: hbase-balancer U: hbase-balancer
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6729/1/console
versionsgit=2.34.1 maven=3.9.8 spotbugs=4.7.3
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 43sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed 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 💚mvninstall4m 1smaster passed
+1 💚compile0m 24smaster passed
+1 💚javadoc0m 16smaster passed
+1 💚shadedjars7m 58sbranch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+1 💚mvninstall3m 56sthe patch passed
+1 💚compile0m 15sthe patch passed
+1 💚javac0m 15sthe patch passed
+1 💚javadoc0m 11sthe patch passed
+1 💚shadedjars9m 0spatch has no errors when building our shaded downstream artifacts.
_ Other Tests _
+1 💚unit6m 35shbase-balancer in the patch passed.
34m 48s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6729/1/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR#6729
Optional Testsjavac javadoc unit compile shadedjars
unameLinux 515db758f4ae 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 toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / eb67f23
Default JavaEclipse Adoptium-17.0.11+9
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6729/1/testReport/
Max. process+thread count265 (vs. ulimit of 30000)
modulesC: hbase-balancer U: hbase-balancer
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6729/1/console
versionsgit=2.34.1 maven=3.9.8
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@PDavid
PDavid marked this pull request as ready for review February 27, 2025 13:43

@rmdmattinglyrmdmattingly left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Apologies here, thank you for the fix @PDavid

@rmdmattingly

Copy link
Copy Markdown
Contributor

In case it helps, I had a similar thought in https://github.com/apache/hbase/pull/6722/files#diff-bfb1a20f8f7f716aaaf4eb55d2450ad337bb2ce157f51f13c135b3eab3175463L43 and I anticipate shipping that change today

@PDavid

Copy link
Copy Markdown
ContributorAuthor

In case it helps, I had a similar thought in #6722 (files) and I anticipate shipping that change today

Nice, thanks @rmdmattingly. Please feel free to ship it. Then I'll close this PR. 😄

@PDavid

Copy link
Copy Markdown
ContributorAuthor

@PDavidPDavid closed this Feb 28, 2025
@PDavid
PDavid deleted the HBASE-29155-fix-checkstyle branch March 10, 2025 12:28
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

@PDavid@Apache-HBase@rmdmattingly@NihalJain@Apache9