wchevreuil commented on code in PR #5468:
URL: https://github.com/apache/hbase/pull/5468#discussion_r1371405941
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java:
##########
@@ -3933,4 +3937,25 @@ public void onConfigurationChange(Configuration conf) {
super.onConfigurationChange(conf);
setReloadableGuardrails(conf);
}
+
+ @Override
+ public GetPrefetchedFilesListResponse getPrefetchedFilesList(RpcController
controller,
+ GetPrefetchedFilesListRequest request) throws ServiceException {
+ GetPrefetchedFilesListResponse.Builder responseBuilder =
+ GetPrefetchedFilesListResponse.newBuilder();
+
+ List<String> fullyCachedFiles = new ArrayList<>();
+ server.getBlockCache().ifPresent(blockCache -> {
+ if (blockCache instanceof CombinedBlockCache) {
+ BlockCache l2 = ((CombinedBlockCache)
blockCache).getSecondLevelCache();
+ if (l2 instanceof BucketCache) {
+ if (((BucketCache) l2).isCachePersistenceEnabled()) {
Review Comment:
It's fine to add the additional getter, but we should not duplicate code.
This whole implementation is identical to
BucketCache.getBucketCacheFromCacheConfig, so you should just call it inside
your method.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]