From 03a4995a161face8998eadbbf9baaf2d4f55e63a Mon Sep 17 00:00:00 2001 From: Lari Hotari Date: Thu, 9 May 2024 13:04:12 +0300 Subject: [PATCH] [improve][offload] Replace usage of shaded class in OffsetsCache (#22683) --- .../bookkeeper/mledger/offload/jcloud/impl/OffsetsCache.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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();