Skip to content

Commit 32be893

Browse files
lhotaricoderzc
authored andcommitted
[improve][offload] Replace usage of shaded class in OffsetsCache (apache#22683)
(cherry picked from commit 03a4995)
1 parent f8d2cc4 commit 32be893

File tree

1 file changed

+2
-2
lines changed
  • tiered-storage/jcloud/src/main/java/org/apache/bookkeeper/mledger/offload/jcloud/impl

1 file changed

+2
-2
lines changed

tiered-storage/jcloud/src/main/java/org/apache/bookkeeper/mledger/offload/jcloud/impl/OffsetsCache.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
import com.google.common.cache.Cache;
2222
import com.google.common.cache.CacheBuilder;
23-
import io.grpc.netty.shaded.io.netty.util.concurrent.DefaultThreadFactory;
23+
import com.google.common.util.concurrent.ThreadFactoryBuilder;
2424
import java.util.concurrent.Executors;
2525
import java.util.concurrent.ScheduledExecutorService;
2626
import java.util.concurrent.TimeUnit;
@@ -49,7 +49,7 @@ public OffsetsCache() {
4949
.build();
5050
cacheEvictionExecutor =
5151
Executors.newSingleThreadScheduledExecutor(
52-
new DefaultThreadFactory("jcloud-offsets-cache-eviction"));
52+
new ThreadFactoryBuilder().setNameFormat("jcloud-offsets-cache-eviction").build());
5353
int period = Math.max(CACHE_TTL_SECONDS / 2, 1);
5454
cacheEvictionExecutor.scheduleAtFixedRate(() -> {
5555
entryOffsetsCache.cleanUp();

0 commit comments

Comments
 (0)