leventov commented on a change in pull request #9166: use Caffeine instead of
Guava Cache
URL: https://github.com/apache/druid/pull/9166#discussion_r367286494
##########
File path:
extensions-core/lookups-cached-single/src/main/java/org/apache/druid/server/lookup/cache/loading/LoadingCache.java
##########
@@ -21,19 +21,18 @@
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
-import com.google.common.cache.CacheLoader;
+import com.github.benmanes.caffeine.cache.CacheLoader;
import com.google.common.util.concurrent.ExecutionError;
import com.google.common.util.concurrent.UncheckedExecutionException;
import javax.annotation.Nullable;
import java.io.Closeable;
import java.util.Map;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutionException;
+import java.util.function.Function;
/**
* A semi-persistent mapping from keys to values. Cache entries are added using
- * {@link #get(Object, Callable)} and stored in the cache until either evicted
or manually invalidated.
+ * {@link #get(Object, Function)} and stored in the cache until either evicted
or manually invalidated.
* <p>
* <p>Implementations of this interface are expected to be thread-safe, and
can be safely accessed
* by multiple concurrent threads.
Review comment:
Please ensure a warning is printed when legacy "guava" type is specified,
and add a new "onHeap" type.
----------------------------------------------------------------
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]