Skip to content

Commit

Permalink
[improve][offload] Replace usage of shaded class in OffsetsCache (apa…
Browse files Browse the repository at this point in the history
…che#22683)

(cherry picked from commit 395a886)
  • Loading branch information
lhotari authored and srinath-ctds committed May 16, 2024
1 parent 3ed7f4c commit 2a96f95
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 2a96f95

Please sign in to comment.