wchevreuil commented on code in PR #5808:
URL: https://github.com/apache/hbase/pull/5808#discussion_r1570350364
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFilePreadReader.java:
##########
@@ -37,10 +37,15 @@ public class HFilePreadReader extends HFileReaderImpl {
public HFilePreadReader(ReaderContext context, HFileInfo fileInfo,
CacheConfig cacheConf,
Configuration conf) throws IOException {
super(context, fileInfo, cacheConf, conf);
+
final MutableBoolean shouldCache = new MutableBoolean(true);
+ // Initialize HFileInfo object with metadata for caching decisions
+ HFileInfo hFileInfoForCaching = new HFileInfo(context, conf);
+ hFileInfoForCaching.initMetaAndIndex(this);
Review Comment:
AFAICT, we would just be calling it again in HStoreFile.open, right after we
return from reader creation. I don't like duplicate object or code run
unnecessarily, so maybe we could modify initMetaAndIndex to do its stuff just
if the file info hasn't been initialized yet.
--
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]