leventov commented on a change in pull request #9166: use Caffeine instead of 
Guava Cache
URL: https://github.com/apache/druid/pull/9166#discussion_r367285150
 
 

 ##########
 File path: 
extensions-core/lookups-cached-single/src/main/java/org/apache/druid/server/lookup/cache/loading/OnHeapLoadingCache.java
 ##########
 @@ -22,29 +22,24 @@
 
 import com.fasterxml.jackson.annotation.JsonCreator;
 import com.fasterxml.jackson.annotation.JsonProperty;
-import com.google.common.cache.Cache;
-import com.google.common.cache.CacheBuilder;
+import com.github.benmanes.caffeine.cache.Cache;
+import com.github.benmanes.caffeine.cache.Caffeine;
 import org.apache.druid.java.util.common.logger.Logger;
 
 import java.util.Map;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.function.Function;
 
 
 public class OnHeapLoadingCache<K, V> implements LoadingCache<K, V>
 {
   private static final Logger log = new Logger(OnHeapLoadingCache.class);
   private static final int DEFAULT_INITIAL_CAPACITY = 16;
-  //See com.google.common.cache.CacheBuilder#DEFAULT_CONCURRENCY_LEVEL
-  private static final int DEFAULT_CONCURRENCY_LEVEL = 4;
 
   private final Cache<K, V> cache;
   private final AtomicBoolean isClosed = new AtomicBoolean(false);
   @JsonProperty
-  private final int concurrencyLevel;
 
 Review comment:
   Please make sure a warning is printed if this legacy JSON property is still 
specified.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to