Skip to content

HBASE-27206 Clean up error-prone findings in hbase-common - #4645

Merged
Apache9 merged 1 commit into
apache:masterfrom
apurtell:HBASE-27206
Aug 21, 2022
Merged

HBASE-27206 Clean up error-prone findings in hbase-common#4645
Apache9 merged 1 commit into
apache:masterfrom
apurtell:HBASE-27206

Conversation

@apurtell

Copy link
Copy Markdown
Contributor

No description provided.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 49sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 1sNo 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 💚mvninstall3m 1smaster passed
+1 💚compile0m 35smaster passed
+1 💚checkstyle0m 15smaster passed
+1 💚spotless0m 48sbranch has no errors when running spotless:check.
+1 💚spotbugs0m 34smaster passed
_ Patch Compile Tests _
+1 💚mvninstall2m 45sthe patch passed
+1 💚compile0m 49sthe patch passed
+1 💚javac0m 49shbase-common generated 0 new + 0 unchanged - 151 fixed = 0 total (was 151)
-0 ⚠️checkstyle0m 23shbase-common: The patch generated 4 new + 145 unchanged - 13 fixed = 149 total (was 158)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚hadoopcheck17m 44sPatch does not cause any errors with Hadoop 3.1.2 3.2.2 3.3.1.
+1 💚spotless0m 52spatch has no errors when running spotless:check.
+1 💚spotbugs0m 38sthe patch passed
_ Other Tests _
+1 💚asflicense0m 11sThe patch does not generate ASF License warnings.
36m 55s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4645/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#4645
Optional Testsdupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile
unameLinux da976a76c3b7 5.4.0-1043-aws #45~18.04.1-Ubuntu SMP Fri Apr 9 23:32:25 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 31fc97e
Default JavaAdoptOpenJDK-1.8.0_282-b08
checkstylehttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4645/1/artifact/yetus-general-check/output/diff-checkstyle-hbase-common.txt
Max. process+thread count70 (vs. ulimit of 30000)
modulesC: hbase-common U: hbase-common
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4645/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 🆗reexec0m 39sDocker 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 💚mvninstall2m 31smaster passed
+1 💚compile0m 15smaster passed
+1 💚shadedjars4m 3sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 14smaster passed
_ Patch Compile Tests _
+1 💚mvninstall2m 11sthe patch passed
+1 💚compile0m 14sthe patch passed
+1 💚javac0m 14sthe patch passed
+1 💚shadedjars4m 2spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 12sthe patch passed
_ Other Tests _
+1 💚unit1m 23shbase-common in the patch passed.
+1 💚unit200m 11shbase-server in the patch passed.
217m 27s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4645/1/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR#4645
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 6466517cd1d4 5.4.0-1025-aws #25~18.04.1-Ubuntu SMP Fri Sep 11 12:03:04 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 31fc97e
Default JavaAdoptOpenJDK-1.8.0_282-b08
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4645/1/testReport/
Max. process+thread count2782 (vs. ulimit of 30000)
modulesC: hbase-common U: hbase-common
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4645/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 🆗reexec1m 2sDocker 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 💚mvninstall2m 55smaster passed
+1 💚compile0m 17smaster passed
+1 💚shadedjars3m 51sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 18smaster passed
_ Patch Compile Tests _
+1 💚mvninstall2m 41sthe patch passed
+1 💚compile0m 17sthe patch passed
+1 💚javac0m 17sthe patch passed
+1 💚shadedjars3m 48spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 17shbase-common generated 0 new + 4 unchanged - 10 fixed = 4 total (was 14)
_ Other Tests _
+1 💚unit1m 45shbase-common in the patch passed.
+1 💚unit213m 10shbase-server in the patch passed.
232m 20s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4645/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#4645
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 8a5f89509fe2 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 31fc97e
Default JavaAdoptOpenJDK-11.0.10+9
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4645/1/testReport/
Max. process+thread count2488 (vs. ulimit of 30000)
modulesC: hbase-common U: hbase-common
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4645/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.

@Apache9Apache9 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.

Overall LGTM. Left a few comments.

Thanks @apurtell for the hard work!

Comment threadhbase-common/src/main/java/org/apache/hadoop/hbase/ServerName.java Outdated
Comment threadhbase-common/src/main/java/org/apache/hadoop/hbase/ServerName.java Outdated
private int qualifierOffset;
private int qualifierLength;
private long timestamp;
private long timeStamp;

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.

I think timestamp is a valid word in English?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

This was an instance of the error-prone warning about inconsistent caps with respect to the field name and getter/setter or constructor parameter name. https://github.com/google/error-prone/blob/master/docs/bugpattern/InconsistentCapitalization.md

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.

Searched our code base, there are bunch of mixed TimeStamp and Timestamp usages... We even have code like this:

.setTimestampsOfLastAppliedOp(rls.getTimeStampsOfLastAppliedOp())

And in the same protobuf message, we have mixed style of timestamps...

message ReplicationLoadSink {
required uint64 ageOfLastAppliedOp = 1;
required uint64 timeStampsOfLastAppliedOp = 2;
// The below two were added after hbase-2.0.0 went out. They have to be added as 'optional' else
// we break upgrades; old RegionServers reporting in w/ old forms of this message will fail to
// deserialize on the new Master. See HBASE-25234
optional uint64 timestampStarted = 3;
optional uint64 totalOpsProcessed = 4;
}

So I tend to leave it as it for now. Maybe we should start a discussion thread on the dev list on how to better fix these problems...

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.

If we do not change the public method declaration I think it is fine. Can discuss this later.

Comment threadhbase-common/src/main/java/org/apache/hadoop/hbase/util/DNS.java Outdated
Comment threadhbase-common/src/main/java/org/apache/hadoop/hbase/util/Pair.java Outdated
@apurtell

Copy link
Copy Markdown
ContributorAuthor

Rebase. Address review feedback.

@apurtell
apurtell requested a review from Apache9July 26, 2022 00:16
@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 50sDocker 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 💚mvninstall2m 27smaster passed
+1 💚compile0m 31smaster passed
+1 💚checkstyle0m 14smaster passed
+1 💚spotless0m 44sbranch has no errors when running spotless:check.
+1 💚spotbugs0m 28smaster passed
_ Patch Compile Tests _
+1 💚mvninstall2m 10sthe patch passed
+1 💚compile0m 28sthe patch passed
+1 💚javac0m 28shbase-common generated 0 new + 0 unchanged - 151 fixed = 0 total (was 151)
-0 ⚠️checkstyle0m 12shbase-common: The patch generated 3 new + 145 unchanged - 13 fixed = 148 total (was 158)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚hadoopcheck11m 51sPatch does not cause any errors with Hadoop 3.1.2 3.2.2 3.3.1.
+1 💚spotless0m 43spatch has no errors when running spotless:check.
+1 💚spotbugs0m 32sthe patch passed
_ Other Tests _
+1 💚asflicense0m 9sThe patch does not generate ASF License warnings.
26m 35s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4645/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#4645
Optional Testsdupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile
unameLinux dc2438b9bf14 5.4.0-1043-aws #45~18.04.1-Ubuntu SMP Fri Apr 9 23:32:25 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / ca545c4
Default JavaAdoptOpenJDK-1.8.0_282-b08
checkstylehttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4645/2/artifact/yetus-general-check/output/diff-checkstyle-hbase-common.txt
Max. process+thread count69 (vs. ulimit of 30000)
modulesC: hbase-common U: hbase-common
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4645/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.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 56sDocker 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 💚mvninstall3m 8smaster passed
+1 💚compile0m 18smaster passed
+1 💚shadedjars4m 4sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 15smaster passed
_ Patch Compile Tests _
+1 💚mvninstall2m 44sthe patch passed
+1 💚compile0m 17sthe patch passed
+1 💚javac0m 17sthe patch passed
+1 💚shadedjars4m 0spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 17shbase-common generated 0 new + 4 unchanged - 10 fixed = 4 total (was 14)
_ Other Tests _
+1 💚unit1m 44shbase-common in the patch passed.
+1 💚unit211m 24shbase-server in the patch passed.
232m 7s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4645/2/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#4645
Optional Testsjavac javadoc unit shadedjars compile
unameLinux e9f4b5cc7cd9 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / ca545c4
Default JavaAdoptOpenJDK-11.0.10+9
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4645/2/testReport/
Max. process+thread count2435 (vs. ulimit of 30000)
modulesC: hbase-common U: hbase-common
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4645/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 22sDocker 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 💚mvninstall3m 29smaster passed
+1 💚compile0m 17smaster passed
+1 💚shadedjars4m 28sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 16smaster passed
_ Patch Compile Tests _
+1 💚mvninstall2m 41sthe patch passed
+1 💚compile0m 20sthe patch passed
+1 💚javac0m 20sthe patch passed
+1 💚shadedjars4m 47spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 13sthe patch passed
_ Other Tests _
+1 💚unit1m 34shbase-common in the patch passed.
-1 ❌unit227m 8shbase-server in the patch failed.
249m 40s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4645/2/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR#4645
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 4501a77712ae 5.4.0-1025-aws #25~18.04.1-Ubuntu SMP Fri Sep 11 12:03:04 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / ca545c4
Default JavaAdoptOpenJDK-1.8.0_282-b08
unithttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4645/2/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-hbase-server.txt
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4645/2/testReport/
Max. process+thread count2352 (vs. ulimit of 30000)
modulesC: hbase-common U: hbase-common
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4645/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.

@apurtell

apurtell commented Jul 27, 2022

Copy link
Copy Markdown
ContributorAuthor

hbase-server results here are probably not related, but it is a bit hard to say.

There are two tracing related flakes. /cc @ndimiduk

There was a timed out test, but I don't know which one, but I did disable a known hang just today so another run might be cleaner.

@apurtell

Copy link
Copy Markdown
ContributorAuthor

Let me rebase and push to trigger another run.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 27sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 1sNo 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 💚mvninstall2m 11smaster passed
+1 💚compile0m 29smaster passed
+1 💚checkstyle0m 12smaster passed
+1 💚spotless0m 44sbranch has no errors when running spotless:check.
+1 💚spotbugs0m 25smaster passed
_ Patch Compile Tests _
+1 💚mvninstall2m 13sthe patch passed
+1 💚compile0m 29sthe patch passed
+1 💚javac0m 29shbase-common generated 0 new + 0 unchanged - 151 fixed = 0 total (was 151)
-0 ⚠️checkstyle0m 11shbase-common: The patch generated 3 new + 145 unchanged - 13 fixed = 148 total (was 158)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚hadoopcheck11m 53sPatch does not cause any errors with Hadoop 3.1.2 3.2.2 3.3.1.
+1 💚spotless0m 43spatch has no errors when running spotless:check.
+1 💚spotbugs0m 31sthe patch passed
_ Other Tests _
+1 💚asflicense0m 7sThe patch does not generate ASF License warnings.
27m 23s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4645/3/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#4645
Optional Testsdupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile
unameLinux ec2ccf80b0cd 5.4.0-1043-aws #45~18.04.1-Ubuntu SMP Fri Apr 9 23:32:25 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / a3eeab8
Default JavaAdoptOpenJDK-1.8.0_282-b08
checkstylehttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4645/3/artifact/yetus-general-check/output/diff-checkstyle-hbase-common.txt
Max. process+thread count64 (vs. ulimit of 30000)
modulesC: hbase-common U: hbase-common
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4645/3/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 32sDocker 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 💚mvninstall2m 15smaster passed
+1 💚compile0m 13smaster passed
+1 💚shadedjars3m 59sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 12smaster passed
_ Patch Compile Tests _
+1 💚mvninstall2m 15sthe patch passed
+1 💚compile0m 13sthe patch passed
+1 💚javac0m 13sthe patch passed
+1 💚shadedjars4m 0spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 12sthe patch passed
_ Other Tests _
+1 💚unit1m 22shbase-common in the patch passed.
+1 💚unit199m 54shbase-server in the patch passed.
217m 45s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4645/3/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR#4645
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 355712537a20 5.4.0-1025-aws #25~18.04.1-Ubuntu SMP Fri Sep 11 12:03:04 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / a3eeab8
Default JavaAdoptOpenJDK-1.8.0_282-b08
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4645/3/testReport/
Max. process+thread count2647 (vs. ulimit of 30000)
modulesC: hbase-common U: hbase-common
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4645/3/console
versionsgit=2.17.1 maven=3.6.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@ndimiduk

Copy link
Copy Markdown
Member

hbase-server results here are probably not related, but it is a bit hard to say.

There are two tracing related flakes. /cc @ndimiduk

There was a timed out test, but I don't know which one, but I did disable a known hang just today so another run might be cleaner.

Thanks for pointing these out, I see the logs.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 49sDocker 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 💚mvninstall2m 37smaster passed
+1 💚compile0m 31smaster passed
+1 💚checkstyle0m 13smaster passed
+1 💚spotless0m 43sbranch has no errors when running spotless:check.
+1 💚spotbugs0m 28smaster passed
_ Patch Compile Tests _
+1 💚mvninstall2m 11sthe patch passed
+1 💚compile0m 29sthe patch passed
+1 💚javac0m 29shbase-common generated 0 new + 0 unchanged - 151 fixed = 0 total (was 151)
-0 ⚠️checkstyle0m 11shbase-common: The patch generated 3 new + 145 unchanged - 13 fixed = 148 total (was 158)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚hadoopcheck12m 2sPatch does not cause any errors with Hadoop 3.1.2 3.2.2 3.3.1.
+1 💚spotless0m 42spatch has no errors when running spotless:check.
+1 💚spotbugs0m 31sthe patch passed
_ Other Tests _
+1 💚asflicense0m 8sThe patch does not generate ASF License warnings.
27m 2s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4645/4/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#4645
Optional Testsdupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile
unameLinux b7b7482dd777 5.4.0-1081-aws #88~18.04.1-Ubuntu SMP Thu Jun 23 16:29:17 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 486d19e
Default JavaAdoptOpenJDK-1.8.0_282-b08
checkstylehttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4645/4/artifact/yetus-general-check/output/diff-checkstyle-hbase-common.txt
Max. process+thread count64 (vs. ulimit of 30000)
modulesC: hbase-common U: hbase-common
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4645/4/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 🆗reexec0m 59sDocker 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 💚mvninstall2m 45smaster passed
+1 💚compile0m 17smaster passed
+1 💚shadedjars3m 46sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 16smaster passed
_ Patch Compile Tests _
+1 💚mvninstall2m 36sthe patch passed
+1 💚compile0m 17sthe patch passed
+1 💚javac0m 17sthe patch passed
+1 💚shadedjars3m 48spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 16shbase-common generated 0 new + 4 unchanged - 10 fixed = 4 total (was 14)
_ Other Tests _
+1 💚unit1m 44shbase-common in the patch passed.
+1 💚unit210m 16shbase-server in the patch passed.
228m 46s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4645/4/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#4645
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 936d9b40f4a7 5.4.0-122-generic #138-Ubuntu SMP Wed Jun 22 15:00:31 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 486d19e
Default JavaAdoptOpenJDK-11.0.10+9
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4645/4/testReport/
Max. process+thread count2470 (vs. ulimit of 30000)
modulesC: hbase-common U: hbase-common
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4645/4/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 6sDocker 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 💚mvninstall3m 58smaster passed
+1 💚compile0m 16smaster passed
+1 💚shadedjars4m 40sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 18smaster passed
_ Patch Compile Tests _
+1 💚mvninstall2m 49sthe patch passed
+1 💚compile0m 23sthe patch passed
+1 💚javac0m 23sthe patch passed
+1 💚shadedjars4m 48spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 13sthe patch passed
_ Other Tests _
+1 💚unit1m 37shbase-common in the patch passed.
-1 ❌unit206m 47shbase-server in the patch failed.
228m 39s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4645/4/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR#4645
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 6bec8295ea6a 5.4.0-1081-aws #88~18.04.1-Ubuntu SMP Thu Jun 23 16:29:17 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 486d19e
Default JavaAdoptOpenJDK-1.8.0_282-b08
unithttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4645/4/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-hbase-server.txt
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4645/4/testReport/
Max. process+thread count3297 (vs. ulimit of 30000)
modulesC: hbase-common U: hbase-common
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4645/4/console
versionsgit=2.17.1 maven=3.6.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

}

/**
* Sets the given timestamp to the cell. n * @param ts buffer containing the timestamp value

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.

I think that these comment lines starting with n are left-overs from the auto-formatting tool getting confused by newline characters.

}

@Override
@SuppressWarnings("ByteBufferBackingArray")

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.

I agree with ErrorProne that this use of a ByteBuffer is problematic. We're leaving it to the caller to perform bounds checking but they don't have the underlying keyBuffer.

Keep the warnings so that we don't lose track of this issue?

* The values in the enum appear in the order they appear in a version 2 HFile.
*/
@InterfaceAudience.Private
@SuppressWarnings("ImmutableEnumChecker")

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.

Does the warning specify the point of mutability? A quick scan here and I don't see any state mutations.

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.

I guess it is because the 'magic' field. It is a byte array, the content can be changed at runtime.

*/
@InterfaceAudience.Private
@InterfaceStability.Stable
@SuppressWarnings({ "unchecked", "rawtypes", "hiding", "TypeParameterShadowing" })

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.

Yikes!

@edu.umd.cs.findbugs.annotations.SuppressWarnings(
value = "EQ_CHECK_FOR_OPERAND_NOT_COMPATIBLE_WITH_THIS",
justification = "It has been like this forever")
@SuppressWarnings("MixedMutabilityReturnType")

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.

This method returns both mutable and immutable collections or maps from different paths. This may be confusing for users of the method.

Yeah, that's a fair description.

// using linux bash commands to retrieve info
Process p = Runtime.getRuntime()
.exec(new String[] { "bash", "-c", "ls /proc/" + pidhost[0] + "/fdinfo | wc -l" });
.exec(new String[] { "bash", "-c", "ls /proc/" + pidhost.next() + "/fdinfo | wc -l" });

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.

Should we be looking under /proc/self instead of parsing the pid?

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.

This could be done as a separated issue, not an error prone related problem.

@ndimiduk

Copy link
Copy Markdown
Member

Thanks for putting time into this cleanup, @apurtell .

@Apache9Apache9 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.

No blocker then. Let's get this merged first.

Thanks @apurtell for taking care of this!

private int qualifierOffset;
private int qualifierLength;
private long timestamp;
private long timeStamp;

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.

If we do not change the public method declaration I think it is fine. Can discuss this later.

* The values in the enum appear in the order they appear in a version 2 HFile.
*/
@InterfaceAudience.Private
@SuppressWarnings("ImmutableEnumChecker")

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.

I guess it is because the 'magic' field. It is a byte array, the content can be changed at runtime.

// using linux bash commands to retrieve info
Process p = Runtime.getRuntime()
.exec(new String[] { "bash", "-c", "ls /proc/" + pidhost[0] + "/fdinfo | wc -l" });
.exec(new String[] { "bash", "-c", "ls /proc/" + pidhost.next() + "/fdinfo | wc -l" });

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.

This could be done as a separated issue, not an error prone related problem.

try {
for (Cell k : set) {
assertTrue("count=" + count + ", " + k.toString(), count++ == k.getTimestamp());
for (Cell k : set) {

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.

Could try to use assertThrows in the future. Not a blocker.

expectedAssert(() -> testReadAndWrite(array, 0, 0, (byte) 15));
expectedAssert(() -> testReadAndWrite(array, 4096, cap - 4096 + 1, (byte) 16));

// XXX: These cases were apparently expected to assert but expectedAssert() was

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.

Oops.

@Apache9
Apache9 merged commit fbe3b90 into apache:masterAug 21, 2022
Apache9 pushed a commit that referenced this pull request Aug 21, 2022
Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
Signed-off-by: Duo Zhang <zhangduo@apache.org>
(cherry picked from commit fbe3b90)
Conflicts:
hbase-common/src/main/java/org/apache/hadoop/hbase/CellUtil.java
hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValueUtil.java
hbase-common/src/main/java/org/apache/hadoop/hbase/ServerName.java
hbase-common/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupInfo.java
hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java
hbase-common/src/test/java/org/apache/hadoop/hbase/io/crypto/TestKeyStoreKeyProvider.java
hbase-common/src/test/java/org/apache/hadoop/hbase/types/TestOrderedFloat32.java
Apache9 pushed a commit that referenced this pull request Aug 21, 2022
Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
Signed-off-by: Duo Zhang <zhangduo@apache.org>
(cherry picked from commit fbe3b90)
Conflicts:
hbase-common/src/main/java/org/apache/hadoop/hbase/CellUtil.java
hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValueUtil.java
hbase-common/src/main/java/org/apache/hadoop/hbase/ServerName.java
hbase-common/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupInfo.java
hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java
hbase-common/src/test/java/org/apache/hadoop/hbase/io/crypto/TestKeyStoreKeyProvider.java
hbase-common/src/test/java/org/apache/hadoop/hbase/types/TestOrderedFloat32.java
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.

4 participants

@apurtell@Apache-HBase@ndimiduk@Apache9