jhungund commented on code in PR #5856: URL: https://github.com/apache/hbase/pull/5856#discussion_r1583284258
########## hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java: ########## @@ -2195,17 +2194,19 @@ public Optional<Boolean> blockFitsIntoTheCache(HFileBlock block) { @Override public Optional<Boolean> shouldCacheFile(HFileInfo hFileInfo, Configuration conf) { String fileName = hFileInfo.getHFileContext().getHFileName(); - try { - DataTieringManager dataTieringManager = DataTieringManager.getInstance(); + DataTieringManager dataTieringManager = DataTieringManager.getInstance(); + if (dataTieringManager != null) { if (!dataTieringManager.isHotData(hFileInfo, conf)) { LOG.debug("Data tiering is enabled for file: '{}' and it is not hot data", fileName); return Optional.of(false); + } else { + LOG.debug("Data tiering is enabled for file: '{}' and it is hot data", fileName); } - } catch (IllegalStateException e) { - LOG.error("Error while getting DataTieringManager instance: {}", e.getMessage()); + } else { + LOG.debug("Data tiering feature is not enabled. " + + " The file: '{}' will be loaded if not already loaded", fileName); } - - // if we don't have the file in fullyCachedFiles, we should cache it + // if we don't have the file in fullyCachedFiles, we should cache it. Review Comment: ack! -- 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-unsubscr...@hbase.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org