liuxiaocs7 commented on code in PR #7901:
URL: https://github.com/apache/hbase/pull/7901#discussion_r2937998377


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java:
##########
@@ -946,14 +949,19 @@ public HRegion(final HRegionFileSystem fs, final WAL wal, 
final Configuration co
     this.isRowCacheEnabled = checkRowCacheConfig();
   }
 
-  private boolean checkRowCacheConfig() {
+  boolean checkRowCacheConfig() {
     Boolean fromDescriptor = htableDescriptor.getRowCacheEnabled();
     // The setting from TableDescriptor has higher priority than the global 
configuration
     return fromDescriptor != null
       ? fromDescriptor
       : conf.getBoolean(HConstants.ROW_CACHE_ENABLED_KEY, 
HConstants.ROW_CACHE_ENABLED_DEFAULT);
   }
 
+  // For testing only
+  void setRowCache(RowCache rowCache) {
+    this.rowCache = rowCache;
+  }

Review Comment:
   For testing only, we could use `@RestrictedApi` annotation?



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

Reply via email to