wchevreuil commented on code in PR #5468:
URL: https://github.com/apache/hbase/pull/5468#discussion_r1364502882


##########
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:
   Use the static method BucketCache.getBucketCacheFromCacheConfig for finding 
the bucket cache instance.



##########
hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java:
##########
@@ -2615,4 +2615,9 @@ List<LogEntry> getLogEntries(Set<ServerName> serverNames, 
String logType, Server
    * Flush master local region
    */
   void flushMasterStore() throws IOException;
+
+  /**
+   * Get the list of prefetched files
+   */
+  List<String> getPrefetchedFilesList(ServerName serverName) throws 
IOException;

Review Comment:
   Nit: let's call it "getCacheFilesList".



-- 
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]

Reply via email to