From 7155afd7f651288a3416967b3087d0ff835f0353 Mon Sep 17 00:00:00 2001 From: Peter Alfonsi Date: Tue, 17 Oct 2023 16:16:35 -0700 Subject: [PATCH] cleanup --- .../java/org/opensearch/indices/EhcacheDiskCachingTier.java | 3 --- .../indices/TieredCacheSpilloverStrategyHandler.java | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/server/src/main/java/org/opensearch/indices/EhcacheDiskCachingTier.java b/server/src/main/java/org/opensearch/indices/EhcacheDiskCachingTier.java index ce0fc52c9a96e..2469fd5934ea0 100644 --- a/server/src/main/java/org/opensearch/indices/EhcacheDiskCachingTier.java +++ b/server/src/main/java/org/opensearch/indices/EhcacheDiskCachingTier.java @@ -15,8 +15,6 @@ import org.ehcache.config.builders.PooledExecutionServiceConfigurationBuilder; import org.ehcache.config.builders.ResourcePoolsBuilder; import org.ehcache.config.units.MemoryUnit; -import org.ehcache.event.EventFiring; -import org.ehcache.event.EventOrdering; import org.ehcache.event.EventType; import org.ehcache.impl.config.executor.PooledExecutionServiceConfiguration; import org.opensearch.common.ExponentiallyWeightedMovingAverage; @@ -29,7 +27,6 @@ import java.io.IOException; import java.util.Collections; -import java.util.EnumSet; public class EhcacheDiskCachingTier implements DiskCachingTier, RemovalListener { diff --git a/server/src/main/java/org/opensearch/indices/TieredCacheSpilloverStrategyHandler.java b/server/src/main/java/org/opensearch/indices/TieredCacheSpilloverStrategyHandler.java index caa4b108946ac..db9d4ffe41447 100644 --- a/server/src/main/java/org/opensearch/indices/TieredCacheSpilloverStrategyHandler.java +++ b/server/src/main/java/org/opensearch/indices/TieredCacheSpilloverStrategyHandler.java @@ -26,7 +26,7 @@ public class TieredCacheSpilloverStrategyHandler implements TieredCacheHandler, RemovalListener { private final OnHeapCachingTier onHeapCachingTier; - private final DiskCachingTier diskCachingTier; // changed for testing + private final DiskCachingTier diskCachingTier; private final TieredCacheEventListener tieredCacheEventListener; /** @@ -37,7 +37,6 @@ public class TieredCacheSpilloverStrategyHandler impleme private TieredCacheSpilloverStrategyHandler( OnHeapCachingTier onHeapCachingTier, DiskCachingTier diskCachingTier, - // changed to EhcacheDiskCachingTier from CachingTier, to enable close() method, which is needed for tests. Implement close() in CachingTier or DiskCachingTier? TieredCacheEventListener tieredCacheEventListener ) { this.onHeapCachingTier = Objects.requireNonNull(onHeapCachingTier);