diff --git a/tiered-storage/jcloud/src/main/java/org/apache/bookkeeper/mledger/offload/jcloud/impl/OffsetsCache.java b/tiered-storage/jcloud/src/main/java/org/apache/bookkeeper/mledger/offload/jcloud/impl/OffsetsCache.java index fa13afa8ff0e7..6651b199e4e60 100644 --- a/tiered-storage/jcloud/src/main/java/org/apache/bookkeeper/mledger/offload/jcloud/impl/OffsetsCache.java +++ b/tiered-storage/jcloud/src/main/java/org/apache/bookkeeper/mledger/offload/jcloud/impl/OffsetsCache.java @@ -20,7 +20,7 @@ import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; -import io.grpc.netty.shaded.io.netty.util.concurrent.DefaultThreadFactory; +import com.google.common.util.concurrent.ThreadFactoryBuilder; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; @@ -49,7 +49,7 @@ public OffsetsCache() { .build(); cacheEvictionExecutor = Executors.newSingleThreadScheduledExecutor( - new DefaultThreadFactory("jcloud-offsets-cache-eviction")); + new ThreadFactoryBuilder().setNameFormat("jcloud-offsets-cache-eviction").build()); int period = Math.max(CACHE_TTL_SECONDS / 2, 1); cacheEvictionExecutor.scheduleAtFixedRate(() -> { entryOffsetsCache.cleanUp();