petersomogyi commented on code in PR #5823:
URL: https://github.com/apache/hbase/pull/5823#discussion_r1567441400


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheConfig.java:
##########
@@ -464,4 +465,18 @@ public String toString() {
       + shouldEvictOnClose() + ", cacheDataCompressed=" + 
shouldCacheDataCompressed()
       + ", prefetchOnOpen=" + shouldPrefetchOnOpen();
   }
+
+  @Override
+  public void onConfigurationChange(Configuration conf) {
+    cacheDataOnRead = conf.getBoolean(CACHE_DATA_ON_READ_KEY, 
DEFAULT_CACHE_DATA_ON_READ);
+    cacheDataOnWrite = conf.getBoolean(CACHE_BLOCKS_ON_WRITE_KEY, 
DEFAULT_CACHE_DATA_ON_WRITE);
+    evictOnClose = conf.getBoolean(EVICT_BLOCKS_ON_CLOSE_KEY, 
DEFAULT_EVICT_ON_CLOSE);
+    LOG.info(
+      "Config " + "hbase.block.data.cacheonread is changed to {}, "
+        + "hbase.rs.cacheblocksonwrite is changed to {}, "
+        + "hbase.rs.evictblocksonclose is changed to {},",
+      conf.getBoolean(CACHE_DATA_ON_READ_KEY, DEFAULT_CACHE_DATA_ON_READ),
+      conf.getBoolean(CACHE_BLOCKS_ON_WRITE_KEY, DEFAULT_CACHE_DATA_ON_WRITE),
+      conf.getBoolean(EVICT_BLOCKS_ON_CLOSE_KEY, DEFAULT_EVICT_ON_CLOSE));

Review Comment:
   ```suggestion
       LOG.info(
         "Config hbase.block.data.cacheonread is changed to {}, "
           + "hbase.rs.cacheblocksonwrite is changed to {}, "
           + "hbase.rs.evictblocksonclose is changed to {}",
         cacheDataOnRead, cacheDataOnWrite, evictOnClose);
   ```



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

Reply via email to