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-27795: Define RPC API for cache cleaning #5525

Closed
wants to merge 1 commit into from

Conversation

Kota-SH
Copy link
Contributor

@Kota-SH Kota-SH commented Nov 17, 2023

No description provided.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 36s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 prototool 0m 0s prototool was not available.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ HBASE-27389 Compile Tests _
+0 🆗 mvndep 0m 11s Maven dependency ordering for branch
+1 💚 mvninstall 2m 48s HBASE-27389 passed
+1 💚 compile 4m 25s HBASE-27389 passed
+1 💚 checkstyle 1m 30s HBASE-27389 passed
+1 💚 spotless 0m 44s branch has no errors when running spotless:check.
+1 💚 spotbugs 5m 34s HBASE-27389 passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 12s Maven dependency ordering for patch
+1 💚 mvninstall 2m 35s the patch passed
+1 💚 compile 4m 26s the patch passed
+1 💚 cc 4m 26s the patch passed
-0 ⚠️ javac 2m 28s hbase-server generated 1 new + 194 unchanged - 1 fixed = 195 total (was 195)
-0 ⚠️ checkstyle 0m 37s hbase-server: The patch generated 2 new + 13 unchanged - 0 fixed = 15 total (was 13)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 hadoopcheck 9m 17s Patch does not cause any errors with Hadoop 3.2.4 3.3.5.
+1 💚 hbaseprotoc 1m 40s the patch passed
-1 ❌ spotless 0m 38s patch has 21 errors when running spotless:check, run spotless:apply to fix.
-1 ❌ spotbugs 1m 41s hbase-server generated 1 new + 0 unchanged - 0 fixed = 1 total (was 0)
_ Other Tests _
+1 💚 asflicense 0m 40s The patch does not generate ASF License warnings.
49m 16s
Reason Tests
FindBugs module:hbase-server
org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.uncacheStaleBlocks(HRegionServer) makes inefficient use of keySet iterator instead of entrySet iterator At BucketCache.java:keySet iterator instead of entrySet iterator At BucketCache.java:[line 2015]
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5525/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #5525
JIRA Issue HBASE-27795
Optional Tests dupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile cc hbaseprotoc prototool
uname Linux 23233cf2b95d 5.4.0-156-generic #173-Ubuntu SMP Tue Jul 11 07:25:22 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision HBASE-27389 / 69d980a
Default Java Eclipse Adoptium-11.0.17+8
javac https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5525/1/artifact/yetus-general-check/output/diff-compile-javac-hbase-server.txt
checkstyle https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5525/1/artifact/yetus-general-check/output/diff-checkstyle-hbase-server.txt
spotless https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5525/1/artifact/yetus-general-check/output/patch-spotless.txt
spotbugs https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5525/1/artifact/yetus-general-check/output/new-spotbugs-hbase-server.html
Max. process+thread count 81 (vs. ulimit of 30000)
modules C: hbase-protocol-shaded hbase-client hbase-server hbase-thrift U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5525/1/console
versions git=2.34.1 maven=3.8.6 spotbugs=4.7.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 0m 27s 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 _
_ HBASE-27389 Compile Tests _
+0 🆗 mvndep 0m 13s Maven dependency ordering for branch
+1 💚 mvninstall 2m 23s HBASE-27389 passed
+1 💚 compile 1m 31s HBASE-27389 passed
+1 💚 shadedjars 4m 48s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 1m 1s HBASE-27389 passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 11s Maven dependency ordering for patch
+1 💚 mvninstall 2m 12s the patch passed
+1 💚 compile 1m 31s the patch passed
+1 💚 javac 1m 31s the patch passed
+1 💚 shadedjars 4m 47s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 59s the patch passed
_ Other Tests _
+1 💚 unit 0m 27s hbase-protocol-shaded in the patch passed.
+1 💚 unit 1m 19s hbase-client in the patch passed.
-1 ❌ unit 236m 33s hbase-server in the patch failed.
+1 💚 unit 7m 19s hbase-thrift in the patch passed.
270m 16s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5525/1/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR #5525
JIRA Issue HBASE-27795
Optional Tests javac javadoc unit shadedjars compile
uname Linux 9f52196052c5 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 tool maven
Personality dev-support/hbase-personality.sh
git revision HBASE-27389 / 69d980a
Default Java Temurin-1.8.0_352-b08
unit https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5525/1/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-hbase-server.txt
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5525/1/testReport/
Max. process+thread count 4636 (vs. ulimit of 30000)
modules C: hbase-protocol-shaded hbase-client hbase-server hbase-thrift U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5525/1/console
versions git=2.34.1 maven=3.8.6
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 15s Docker mode activated.
-0 ⚠️ yetus 0m 4s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ HBASE-27389 Compile Tests _
+0 🆗 mvndep 0m 11s Maven dependency ordering for branch
+1 💚 mvninstall 2m 48s HBASE-27389 passed
+1 💚 compile 2m 10s HBASE-27389 passed
+1 💚 shadedjars 4m 44s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 1m 24s HBASE-27389 passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 13s Maven dependency ordering for patch
+1 💚 mvninstall 2m 42s the patch passed
+1 💚 compile 2m 9s the patch passed
+1 💚 javac 2m 9s the patch passed
+1 💚 shadedjars 4m 41s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 1m 24s the patch passed
_ Other Tests _
+1 💚 unit 0m 39s hbase-protocol-shaded in the patch passed.
+1 💚 unit 1m 41s hbase-client in the patch passed.
-1 ❌ unit 243m 35s hbase-server in the patch failed.
+1 💚 unit 6m 42s hbase-thrift in the patch passed.
280m 12s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5525/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #5525
JIRA Issue HBASE-27795
Optional Tests javac javadoc unit shadedjars compile
uname Linux 2d94bd77166c 5.4.0-156-generic #173-Ubuntu SMP Tue Jul 11 07:25:22 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision HBASE-27389 / 69d980a
Default Java Eclipse Adoptium-11.0.17+8
unit https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5525/1/artifact/yetus-jdk11-hadoop3-check/output/patch-unit-hbase-server.txt
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5525/1/testReport/
Max. process+thread count 5167 (vs. ulimit of 30000)
modules C: hbase-protocol-shaded hbase-client hbase-server hbase-thrift U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5525/1/console
versions git=2.34.1 maven=3.8.6
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 32s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 prototool 0m 0s prototool was not available.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ HBASE-27389 Compile Tests _
+0 🆗 mvndep 0m 12s Maven dependency ordering for branch
+1 💚 mvninstall 2m 51s HBASE-27389 passed
+1 💚 compile 4m 32s HBASE-27389 passed
+1 💚 checkstyle 1m 25s HBASE-27389 passed
+1 💚 spotless 0m 45s branch has no errors when running spotless:check.
+1 💚 spotbugs 5m 35s HBASE-27389 passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 12s Maven dependency ordering for patch
+1 💚 mvninstall 2m 40s the patch passed
+1 💚 compile 4m 23s the patch passed
+1 💚 cc 4m 23s the patch passed
+1 💚 javac 4m 23s the patch passed
-0 ⚠️ checkstyle 0m 38s hbase-server: The patch generated 1 new + 13 unchanged - 0 fixed = 14 total (was 13)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 hadoopcheck 9m 17s Patch does not cause any errors with Hadoop 3.2.4 3.3.5.
+1 💚 hbaseprotoc 1m 40s the patch passed
+1 💚 spotless 0m 42s patch has no errors when running spotless:check.
+1 💚 spotbugs 6m 6s the patch passed
_ Other Tests _
+1 💚 asflicense 0m 38s The patch does not generate ASF License warnings.
49m 41s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5525/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #5525
JIRA Issue HBASE-27795
Optional Tests dupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile cc hbaseprotoc prototool
uname Linux fc90fc1b2775 5.4.0-156-generic #173-Ubuntu SMP Tue Jul 11 07:25:22 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision HBASE-27389 / 69d980a
Default Java Eclipse Adoptium-11.0.17+8
checkstyle https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5525/2/artifact/yetus-general-check/output/diff-checkstyle-hbase-server.txt
Max. process+thread count 81 (vs. ulimit of 30000)
modules C: hbase-protocol-shaded hbase-client hbase-server hbase-thrift U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5525/2/console
versions git=2.34.1 maven=3.8.6 spotbugs=4.7.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 0m 33s 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 _
_ HBASE-27389 Compile Tests _
+0 🆗 mvndep 0m 13s Maven dependency ordering for branch
+1 💚 mvninstall 2m 32s HBASE-27389 passed
+1 💚 compile 1m 36s HBASE-27389 passed
+1 💚 shadedjars 4m 59s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 1m 3s HBASE-27389 passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 12s Maven dependency ordering for patch
+1 💚 mvninstall 2m 12s the patch passed
+1 💚 compile 1m 36s the patch passed
+1 💚 javac 1m 36s the patch passed
+1 💚 shadedjars 4m 55s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 1m 1s the patch passed
_ Other Tests _
+1 💚 unit 0m 27s hbase-protocol-shaded in the patch passed.
+1 💚 unit 1m 20s hbase-client in the patch passed.
-1 ❌ unit 231m 43s hbase-server in the patch failed.
+1 💚 unit 6m 36s hbase-thrift in the patch passed.
265m 22s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5525/2/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR #5525
JIRA Issue HBASE-27795
Optional Tests javac javadoc unit shadedjars compile
uname Linux 8d1a61d4f139 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 tool maven
Personality dev-support/hbase-personality.sh
git revision HBASE-27389 / 69d980a
Default Java Temurin-1.8.0_352-b08
unit https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5525/2/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-hbase-server.txt
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5525/2/testReport/
Max. process+thread count 4663 (vs. ulimit of 30000)
modules C: hbase-protocol-shaded hbase-client hbase-server hbase-thrift U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5525/2/console
versions git=2.34.1 maven=3.8.6
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 17s 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 _
_ HBASE-27389 Compile Tests _
+0 🆗 mvndep 0m 11s Maven dependency ordering for branch
+1 💚 mvninstall 2m 48s HBASE-27389 passed
+1 💚 compile 2m 10s HBASE-27389 passed
+1 💚 shadedjars 4m 41s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 1m 25s HBASE-27389 passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 14s Maven dependency ordering for patch
+1 💚 mvninstall 2m 38s the patch passed
+1 💚 compile 2m 10s the patch passed
+1 💚 javac 2m 10s the patch passed
+1 💚 shadedjars 4m 38s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 1m 22s the patch passed
_ Other Tests _
+1 💚 unit 0m 38s hbase-protocol-shaded in the patch passed.
+1 💚 unit 1m 42s hbase-client in the patch passed.
-1 ❌ unit 229m 38s hbase-server in the patch failed.
+1 💚 unit 6m 55s hbase-thrift in the patch passed.
266m 30s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5525/2/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #5525
JIRA Issue HBASE-27795
Optional Tests javac javadoc unit shadedjars compile
uname Linux 50a87d11e864 5.4.0-156-generic #173-Ubuntu SMP Tue Jul 11 07:25:22 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision HBASE-27389 / 69d980a
Default Java Eclipse Adoptium-11.0.17+8
unit https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5525/2/artifact/yetus-jdk11-hadoop3-check/output/patch-unit-hbase-server.txt
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5525/2/testReport/
Max. process+thread count 4712 (vs. ulimit of 30000)
modules C: hbase-protocol-shaded hbase-client hbase-server hbase-thrift U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5525/2/console
versions git=2.34.1 maven=3.8.6
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

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.

What will happen if the region is moved back while we are cleaning its blocks in block cache?
And we only implement the uncache method for BucketCache? What about other types of BlockCache?

* @param server HRegionServer
* @return A map of filename and number of blocks evicted.
*/
default Optional<Map<String, Integer>> uncacheStaleBlocks(HRegionServer server) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I prefer here we pass an interface, for testing whether a region is available, instead of pass a HRegionServer directly. It will be easier for testing.
And just returning a Map is enough? If we do not clean any blocks, just return an empty map?

} else {
blocksEvicted = 0;
}
} catch (NotServingRegionException nsre) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this the normal path? In the above if condition, we test isAvailable, so why here we could still get a NotServingRegionException?

@Kota-SH
Copy link
Contributor Author

Kota-SH commented Dec 1, 2023

@Apache9 - Thanks for the review.

What will happen if the region is moved back while we are cleaning its blocks in block cache?
As of now, we check the region state before calling evictBlocksByHfileName() method in uncacheStaleBlocks(). So we only evict blocks if the region state isClosed/isClosing. If the region is moved back, it will be in a different state, and we do not evict its blocks.

What about other types of BlockCache?
Currently, we only support BucketCache and CombinedBlockCache. We can extend this feature to other types of block cache if required. I can create a separate jira to handle those scenarios.

I prefer here we pass an interface / If we do not clean any blocks, just return an empty map?
Yes, we pass an empty map if we don't evict any blocks. I made the change to pass an Interface in a separate PR to the master branch (#5492). Could you please review it there?

Thanks,
Shanmukha K

@Kota-SH Kota-SH closed this Dec 4, 2023
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.

3 participants