stoty commented on code in PR #5802:
URL: https://github.com/apache/hbase/pull/5802#discussion_r1561996353


##########
hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/ScannerResource.java:
##########
@@ -59,8 +62,25 @@ public ScannerResource(TableResource tableResource) throws 
IOException {
     this.tableResource = tableResource;
   }
 
+  private static Cache<String, ScannerInstanceResource> setupScanners() {
+    final Configuration conf = HBaseConfiguration.create();
+
+    int size = conf.getInt(REST_SCANNERCACHE_SIZE, 
DEFAULT_REST_SCANNERCACHE_SIZE);
+    long evictTimeoutMs = conf.getTimeDuration(REST_SCANNERCACHE_EXPIRE_TIME,
+      DEFAULT_REST_SCANNERCACHE_EXPIRE_TIME_MS, TimeUnit.MILLISECONDS);
+
+    Cache<String, ScannerInstanceResource> cache =
+        Caffeine.newBuilder()

Review Comment:
   This one is supposed to be better (though perf doesn't matter that much in 
this case), and the the docs imply that the Guava one is not actively developed 
anymore.
   We already use this library elsewhere.



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