wchevreuil commented on code in PR #5808:
URL: https://github.com/apache/hbase/pull/5808#discussion_r1565426828
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFilePreadReader.java:
##########
@@ -37,6 +38,17 @@ public class HFilePreadReader extends HFileReaderImpl {
public HFilePreadReader(ReaderContext context, HFileInfo fileInfo,
CacheConfig cacheConf,
Configuration conf) throws IOException {
super(context, fileInfo, cacheConf, conf);
+
+ try {
+ DataTieringManager dataTieringManager = DataTieringManager.getInstance();
+ if (!dataTieringManager.isHotData(this)) {
+ LOG.debug("Data tiering is enabled for path '{}' and it is not hot
data", path);
+ return;
+ }
+ } catch (IllegalStateException e) {
+ LOG.error("Error while getting DataTieringManager instance: {}",
e.getMessage());
Review Comment:
It seems you are adding a reader dependency on DataTieringManager mainly to
create an HFileInfo instance and infer the max/min timestamps. Can't you just
pass the fileInfo attr to the shouldCacheFile 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]