You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2022/08/26 16:14:42 UTC

[GitHub] [hbase] Kota-SH commented on a diff in pull request #4726: HBASE-27313: Persist list of Hfiles names for which prefetch is done

Kota-SH commented on code in PR #4726:
URL: https://github.com/apache/hbase/pull/4726#discussion_r956201256


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/PrefetchExecutor.java:
##########
@@ -44,12 +50,15 @@ public final class PrefetchExecutor {
 
   /** Futures for tracking block prefetch activity */
   private static final Map<Path, Future<?>> prefetchFutures = new ConcurrentSkipListMap<>();
+  /** Set of files for which prefetch is completed */
+  public static HashMap<String, Boolean> prefetchCompleted = new HashMap<>();

Review Comment:
   Thanks for the review Wellington :) 
   Yes, my initial approach was to use a set. But I could find a protobuf support for HashSet.
   
   Also, I wanted to maintain a unique set of filenames so I could avoid doing a duplicate check. So I chose a map implementation. 
   
   https://developers.google.com/protocol-buffers/docs/reference/java-generated#map-fields 



-- 
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: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org