diff --git a/modules/cache-common/src/internalClusterTest/java/org/opensearch/cache/common/tier/TieredSpilloverCacheBaseIT.java b/modules/cache-common/src/internalClusterTest/java/org/opensearch/common/cache/tier/TieredSpilloverCacheBaseIT.java similarity index 98% rename from modules/cache-common/src/internalClusterTest/java/org/opensearch/cache/common/tier/TieredSpilloverCacheBaseIT.java rename to modules/cache-common/src/internalClusterTest/java/org/opensearch/common/cache/tier/TieredSpilloverCacheBaseIT.java index 01371ca8eeefb..5e1d474d5c823 100644 --- a/modules/cache-common/src/internalClusterTest/java/org/opensearch/cache/common/tier/TieredSpilloverCacheBaseIT.java +++ b/modules/cache-common/src/internalClusterTest/java/org/opensearch/common/cache/tier/TieredSpilloverCacheBaseIT.java @@ -6,7 +6,7 @@ * compatible open source license. */ -package org.opensearch.cache.common.tier; +package org.opensearch.common.cache.tier; import org.opensearch.common.cache.CacheType; import org.opensearch.common.cache.settings.CacheSettings; diff --git a/modules/cache-common/src/internalClusterTest/java/org/opensearch/cache/common/tier/TieredSpilloverCacheIT.java b/modules/cache-common/src/internalClusterTest/java/org/opensearch/common/cache/tier/TieredSpilloverCacheIT.java similarity index 99% rename from modules/cache-common/src/internalClusterTest/java/org/opensearch/cache/common/tier/TieredSpilloverCacheIT.java rename to modules/cache-common/src/internalClusterTest/java/org/opensearch/common/cache/tier/TieredSpilloverCacheIT.java index d58e36c036510..3d5e3d0c9aab8 100644 --- a/modules/cache-common/src/internalClusterTest/java/org/opensearch/cache/common/tier/TieredSpilloverCacheIT.java +++ b/modules/cache-common/src/internalClusterTest/java/org/opensearch/common/cache/tier/TieredSpilloverCacheIT.java @@ -6,7 +6,7 @@ * compatible open source license. */ -package org.opensearch.cache.common.tier; +package org.opensearch.common.cache.tier; import org.opensearch.action.admin.cluster.node.info.NodeInfo; import org.opensearch.action.admin.cluster.node.info.NodesInfoRequest; @@ -76,7 +76,7 @@ public void testPluginsAreInstalled() { .collect(Collectors.toList()); Assert.assertTrue( pluginInfos.stream() - .anyMatch(pluginInfo -> pluginInfo.getName().equals("org.opensearch.cache.common.tier.TieredSpilloverCachePlugin")) + .anyMatch(pluginInfo -> pluginInfo.getName().equals("org.opensearch.common.cache.tier.TieredSpilloverCachePlugin")) ); } diff --git a/modules/cache-common/src/internalClusterTest/java/org/opensearch/cache/common/tier/TieredSpilloverCacheStatsIT.java b/modules/cache-common/src/internalClusterTest/java/org/opensearch/common/cache/tier/TieredSpilloverCacheStatsIT.java similarity index 99% rename from modules/cache-common/src/internalClusterTest/java/org/opensearch/cache/common/tier/TieredSpilloverCacheStatsIT.java rename to modules/cache-common/src/internalClusterTest/java/org/opensearch/common/cache/tier/TieredSpilloverCacheStatsIT.java index e7f0100f9ea12..83515553d5070 100644 --- a/modules/cache-common/src/internalClusterTest/java/org/opensearch/cache/common/tier/TieredSpilloverCacheStatsIT.java +++ b/modules/cache-common/src/internalClusterTest/java/org/opensearch/common/cache/tier/TieredSpilloverCacheStatsIT.java @@ -6,7 +6,7 @@ * compatible open source license. */ -package org.opensearch.cache.common.tier; +package org.opensearch.common.cache.tier; import org.opensearch.action.admin.cluster.node.stats.NodesStatsRequest; import org.opensearch.action.admin.cluster.node.stats.NodesStatsResponse; diff --git a/modules/cache-common/src/main/java/org/opensearch/cache/common/policy/TookTimePolicy.java b/modules/cache-common/src/main/java/org/opensearch/common/cache/policy/TookTimePolicy.java similarity index 94% rename from modules/cache-common/src/main/java/org/opensearch/cache/common/policy/TookTimePolicy.java rename to modules/cache-common/src/main/java/org/opensearch/common/cache/policy/TookTimePolicy.java index 4bc26803acf4c..2617ac398d204 100644 --- a/modules/cache-common/src/main/java/org/opensearch/cache/common/policy/TookTimePolicy.java +++ b/modules/cache-common/src/main/java/org/opensearch/common/cache/policy/TookTimePolicy.java @@ -11,17 +11,16 @@ * GitHub history for details. */ -package org.opensearch.cache.common.policy; +package org.opensearch.common.cache.policy; import org.opensearch.common.cache.CacheType; -import org.opensearch.common.cache.policy.CachedQueryResult; import org.opensearch.common.settings.ClusterSettings; import org.opensearch.common.unit.TimeValue; import java.util.function.Function; import java.util.function.Predicate; -import static org.opensearch.cache.common.tier.TieredSpilloverCacheSettings.TOOK_TIME_POLICY_CONCRETE_SETTINGS_MAP; +import static org.opensearch.common.cache.tier.TieredSpilloverCacheSettings.TOOK_TIME_POLICY_CONCRETE_SETTINGS_MAP; /** * A cache tier policy which accepts queries whose took time is greater than some threshold. diff --git a/modules/cache-common/src/main/java/org/opensearch/cache/common/policy/package-info.java b/modules/cache-common/src/main/java/org/opensearch/common/cache/policy/package-info.java similarity index 85% rename from modules/cache-common/src/main/java/org/opensearch/cache/common/policy/package-info.java rename to modules/cache-common/src/main/java/org/opensearch/common/cache/policy/package-info.java index 45cfb00662c98..8a1f59a96cd3e 100644 --- a/modules/cache-common/src/main/java/org/opensearch/cache/common/policy/package-info.java +++ b/modules/cache-common/src/main/java/org/opensearch/common/cache/policy/package-info.java @@ -7,4 +7,4 @@ */ /** A package for policies controlling what can enter caches. */ -package org.opensearch.cache.common.policy; +package org.opensearch.common.cache.policy; diff --git a/modules/cache-common/src/main/java/org/opensearch/common/cache/stats/TieredSpilloverCacheStatsHolder.java b/modules/cache-common/src/main/java/org/opensearch/common/cache/stats/TieredSpilloverCacheStatsHolder.java index 76ee9b82e0834..9df34188de2f8 100644 --- a/modules/cache-common/src/main/java/org/opensearch/common/cache/stats/TieredSpilloverCacheStatsHolder.java +++ b/modules/cache-common/src/main/java/org/opensearch/common/cache/stats/TieredSpilloverCacheStatsHolder.java @@ -8,7 +8,7 @@ package org.opensearch.common.cache.stats; -import org.opensearch.cache.common.tier.TieredSpilloverCache; +import org.opensearch.common.cache.tier.TieredSpilloverCache; import java.util.ArrayList; import java.util.List; diff --git a/modules/cache-common/src/main/java/org/opensearch/cache/common/tier/TieredSpilloverCache.java b/modules/cache-common/src/main/java/org/opensearch/common/cache/tier/TieredSpilloverCache.java similarity index 99% rename from modules/cache-common/src/main/java/org/opensearch/cache/common/tier/TieredSpilloverCache.java rename to modules/cache-common/src/main/java/org/opensearch/common/cache/tier/TieredSpilloverCache.java index be777d901d719..c970a7bb6355b 100644 --- a/modules/cache-common/src/main/java/org/opensearch/cache/common/tier/TieredSpilloverCache.java +++ b/modules/cache-common/src/main/java/org/opensearch/common/cache/tier/TieredSpilloverCache.java @@ -6,11 +6,10 @@ * compatible open source license. */ -package org.opensearch.cache.common.tier; +package org.opensearch.common.cache.tier; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.opensearch.cache.common.policy.TookTimePolicy; import org.opensearch.common.annotation.ExperimentalApi; import org.opensearch.common.cache.CacheType; import org.opensearch.common.cache.ICache; @@ -20,6 +19,7 @@ import org.opensearch.common.cache.RemovalNotification; import org.opensearch.common.cache.RemovalReason; import org.opensearch.common.cache.policy.CachedQueryResult; +import org.opensearch.common.cache.policy.TookTimePolicy; import org.opensearch.common.cache.stats.ImmutableCacheStatsHolder; import org.opensearch.common.cache.stats.TieredSpilloverCacheStatsHolder; import org.opensearch.common.cache.store.config.CacheConfig; @@ -50,14 +50,14 @@ import java.util.function.Predicate; import java.util.function.ToLongBiFunction; -import static org.opensearch.cache.common.tier.TieredSpilloverCacheSettings.DISK_CACHE_ENABLED_SETTING_MAP; -import static org.opensearch.cache.common.tier.TieredSpilloverCacheSettings.TIERED_SPILLOVER_DISK_STORE_SIZE; -import static org.opensearch.cache.common.tier.TieredSpilloverCacheSettings.TIERED_SPILLOVER_ONHEAP_STORE_SIZE; -import static org.opensearch.cache.common.tier.TieredSpilloverCacheSettings.TIERED_SPILLOVER_SEGMENTS; import static org.opensearch.common.cache.settings.CacheSettings.INVALID_SEGMENT_COUNT_EXCEPTION_MESSAGE; import static org.opensearch.common.cache.settings.CacheSettings.VALID_SEGMENT_COUNT_VALUES; import static org.opensearch.common.cache.stats.TieredSpilloverCacheStatsHolder.TIER_DIMENSION_VALUE_DISK; import static org.opensearch.common.cache.stats.TieredSpilloverCacheStatsHolder.TIER_DIMENSION_VALUE_ON_HEAP; +import static org.opensearch.common.cache.tier.TieredSpilloverCacheSettings.DISK_CACHE_ENABLED_SETTING_MAP; +import static org.opensearch.common.cache.tier.TieredSpilloverCacheSettings.TIERED_SPILLOVER_DISK_STORE_SIZE; +import static org.opensearch.common.cache.tier.TieredSpilloverCacheSettings.TIERED_SPILLOVER_ONHEAP_STORE_SIZE; +import static org.opensearch.common.cache.tier.TieredSpilloverCacheSettings.TIERED_SPILLOVER_SEGMENTS; /** * This cache spillover the evicted items from heap tier to disk tier. All the new items are first cached on heap diff --git a/modules/cache-common/src/main/java/org/opensearch/cache/common/tier/TieredSpilloverCachePlugin.java b/modules/cache-common/src/main/java/org/opensearch/common/cache/tier/TieredSpilloverCachePlugin.java similarity index 94% rename from modules/cache-common/src/main/java/org/opensearch/cache/common/tier/TieredSpilloverCachePlugin.java rename to modules/cache-common/src/main/java/org/opensearch/common/cache/tier/TieredSpilloverCachePlugin.java index bf522b42b70ca..6929f3d24988c 100644 --- a/modules/cache-common/src/main/java/org/opensearch/cache/common/tier/TieredSpilloverCachePlugin.java +++ b/modules/cache-common/src/main/java/org/opensearch/common/cache/tier/TieredSpilloverCachePlugin.java @@ -6,7 +6,7 @@ * compatible open source license. */ -package org.opensearch.cache.common.tier; +package org.opensearch.common.cache.tier; import org.opensearch.common.cache.CacheType; import org.opensearch.common.cache.ICache; @@ -20,8 +20,8 @@ import java.util.List; import java.util.Map; -import static org.opensearch.cache.common.tier.TieredSpilloverCacheSettings.DISK_CACHE_ENABLED_SETTING_MAP; -import static org.opensearch.cache.common.tier.TieredSpilloverCacheSettings.TOOK_TIME_POLICY_CONCRETE_SETTINGS_MAP; +import static org.opensearch.common.cache.tier.TieredSpilloverCacheSettings.DISK_CACHE_ENABLED_SETTING_MAP; +import static org.opensearch.common.cache.tier.TieredSpilloverCacheSettings.TOOK_TIME_POLICY_CONCRETE_SETTINGS_MAP; /** * Plugin for TieredSpilloverCache. diff --git a/modules/cache-common/src/main/java/org/opensearch/cache/common/tier/TieredSpilloverCacheSettings.java b/modules/cache-common/src/main/java/org/opensearch/common/cache/tier/TieredSpilloverCacheSettings.java similarity index 99% rename from modules/cache-common/src/main/java/org/opensearch/cache/common/tier/TieredSpilloverCacheSettings.java rename to modules/cache-common/src/main/java/org/opensearch/common/cache/tier/TieredSpilloverCacheSettings.java index 122d00af3bd1e..72e133f0a53a9 100644 --- a/modules/cache-common/src/main/java/org/opensearch/cache/common/tier/TieredSpilloverCacheSettings.java +++ b/modules/cache-common/src/main/java/org/opensearch/common/cache/tier/TieredSpilloverCacheSettings.java @@ -6,7 +6,7 @@ * compatible open source license. */ -package org.opensearch.cache.common.tier; +package org.opensearch.common.cache.tier; import org.opensearch.common.cache.CacheType; import org.opensearch.common.settings.Setting; diff --git a/modules/cache-common/src/main/java/org/opensearch/cache/common/tier/package-info.java b/modules/cache-common/src/main/java/org/opensearch/common/cache/tier/package-info.java similarity index 85% rename from modules/cache-common/src/main/java/org/opensearch/cache/common/tier/package-info.java rename to modules/cache-common/src/main/java/org/opensearch/common/cache/tier/package-info.java index fa2de3c14b5dc..e8c457370695a 100644 --- a/modules/cache-common/src/main/java/org/opensearch/cache/common/tier/package-info.java +++ b/modules/cache-common/src/main/java/org/opensearch/common/cache/tier/package-info.java @@ -7,4 +7,4 @@ */ /** Package related to cache tiers **/ -package org.opensearch.cache.common.tier; +package org.opensearch.common.cache.tier; diff --git a/modules/cache-common/src/test/java/org/opensearch/cache/common/policy/TookTimePolicyTests.java b/modules/cache-common/src/test/java/org/opensearch/common/cache/policy/TookTimePolicyTests.java similarity index 96% rename from modules/cache-common/src/test/java/org/opensearch/cache/common/policy/TookTimePolicyTests.java rename to modules/cache-common/src/test/java/org/opensearch/common/cache/policy/TookTimePolicyTests.java index 000067280e50d..4d05c1d13fb59 100644 --- a/modules/cache-common/src/test/java/org/opensearch/cache/common/policy/TookTimePolicyTests.java +++ b/modules/cache-common/src/test/java/org/opensearch/common/cache/policy/TookTimePolicyTests.java @@ -6,14 +6,13 @@ * compatible open source license. */ -package org.opensearch.cache.common.policy; +package org.opensearch.common.cache.policy; import org.apache.lucene.search.ScoreDoc; import org.apache.lucene.search.TopDocs; import org.apache.lucene.search.TotalHits; import org.opensearch.common.Randomness; import org.opensearch.common.cache.CacheType; -import org.opensearch.common.cache.policy.CachedQueryResult; import org.opensearch.common.io.stream.BytesStreamOutput; import org.opensearch.common.lucene.search.TopDocsAndMaxScore; import org.opensearch.common.settings.ClusterSettings; @@ -31,7 +30,7 @@ import java.util.Random; import java.util.function.Function; -import static org.opensearch.cache.common.tier.TieredSpilloverCacheSettings.TOOK_TIME_POLICY_CONCRETE_SETTINGS_MAP; +import static org.opensearch.common.cache.tier.TieredSpilloverCacheSettings.TOOK_TIME_POLICY_CONCRETE_SETTINGS_MAP; public class TookTimePolicyTests extends OpenSearchTestCase { private final Function transformationFunction = (data) -> { diff --git a/modules/cache-common/src/test/java/org/opensearch/cache/common/tier/MockDiskCache.java b/modules/cache-common/src/test/java/org/opensearch/common/cache/tier/MockDiskCache.java similarity index 99% rename from modules/cache-common/src/test/java/org/opensearch/cache/common/tier/MockDiskCache.java rename to modules/cache-common/src/test/java/org/opensearch/common/cache/tier/MockDiskCache.java index fcddd489a27aa..da0885c80e20f 100644 --- a/modules/cache-common/src/test/java/org/opensearch/cache/common/tier/MockDiskCache.java +++ b/modules/cache-common/src/test/java/org/opensearch/common/cache/tier/MockDiskCache.java @@ -6,7 +6,7 @@ * compatible open source license. */ -package org.opensearch.cache.common.tier; +package org.opensearch.common.cache.tier; import org.opensearch.common.cache.CacheType; import org.opensearch.common.cache.ICache; diff --git a/modules/cache-common/src/test/java/org/opensearch/cache/common/tier/TieredSpilloverCachePluginTests.java b/modules/cache-common/src/test/java/org/opensearch/common/cache/tier/TieredSpilloverCachePluginTests.java similarity index 96% rename from modules/cache-common/src/test/java/org/opensearch/cache/common/tier/TieredSpilloverCachePluginTests.java rename to modules/cache-common/src/test/java/org/opensearch/common/cache/tier/TieredSpilloverCachePluginTests.java index 4a96ffe2069ec..42d397875503e 100644 --- a/modules/cache-common/src/test/java/org/opensearch/cache/common/tier/TieredSpilloverCachePluginTests.java +++ b/modules/cache-common/src/test/java/org/opensearch/common/cache/tier/TieredSpilloverCachePluginTests.java @@ -6,7 +6,7 @@ * compatible open source license. */ -package org.opensearch.cache.common.tier; +package org.opensearch.common.cache.tier; import org.opensearch.common.cache.ICache; import org.opensearch.common.settings.Settings; diff --git a/modules/cache-common/src/test/java/org/opensearch/cache/common/tier/TieredSpilloverCacheTests.java b/modules/cache-common/src/test/java/org/opensearch/common/cache/tier/TieredSpilloverCacheTests.java similarity index 99% rename from modules/cache-common/src/test/java/org/opensearch/cache/common/tier/TieredSpilloverCacheTests.java rename to modules/cache-common/src/test/java/org/opensearch/common/cache/tier/TieredSpilloverCacheTests.java index 33d8e41718790..ca8a0f3a4300c 100644 --- a/modules/cache-common/src/test/java/org/opensearch/cache/common/tier/TieredSpilloverCacheTests.java +++ b/modules/cache-common/src/test/java/org/opensearch/common/cache/tier/TieredSpilloverCacheTests.java @@ -6,7 +6,7 @@ * compatible open source license. */ -package org.opensearch.cache.common.tier; +package org.opensearch.common.cache.tier; import org.opensearch.OpenSearchException; import org.opensearch.common.Randomness; @@ -56,17 +56,17 @@ import java.util.function.Function; import java.util.function.Predicate; -import static org.opensearch.cache.common.tier.TieredSpilloverCache.ZERO_SEGMENT_COUNT_EXCEPTION_MESSAGE; -import static org.opensearch.cache.common.tier.TieredSpilloverCacheSettings.DISK_CACHE_ENABLED_SETTING_MAP; -import static org.opensearch.cache.common.tier.TieredSpilloverCacheSettings.TIERED_SPILLOVER_ONHEAP_STORE_SIZE; -import static org.opensearch.cache.common.tier.TieredSpilloverCacheSettings.TIERED_SPILLOVER_SEGMENTS; -import static org.opensearch.cache.common.tier.TieredSpilloverCacheSettings.TOOK_TIME_POLICY_CONCRETE_SETTINGS_MAP; import static org.opensearch.common.cache.settings.CacheSettings.INVALID_SEGMENT_COUNT_EXCEPTION_MESSAGE; import static org.opensearch.common.cache.settings.CacheSettings.VALID_SEGMENT_COUNT_VALUES; import static org.opensearch.common.cache.stats.TieredSpilloverCacheStatsHolder.TIER_DIMENSION_NAME; import static org.opensearch.common.cache.stats.TieredSpilloverCacheStatsHolder.TIER_DIMENSION_VALUE_DISK; import static org.opensearch.common.cache.stats.TieredSpilloverCacheStatsHolder.TIER_DIMENSION_VALUE_ON_HEAP; import static org.opensearch.common.cache.store.settings.OpenSearchOnHeapCacheSettings.MAXIMUM_SIZE_IN_BYTES_KEY; +import static org.opensearch.common.cache.tier.TieredSpilloverCache.ZERO_SEGMENT_COUNT_EXCEPTION_MESSAGE; +import static org.opensearch.common.cache.tier.TieredSpilloverCacheSettings.DISK_CACHE_ENABLED_SETTING_MAP; +import static org.opensearch.common.cache.tier.TieredSpilloverCacheSettings.TIERED_SPILLOVER_ONHEAP_STORE_SIZE; +import static org.opensearch.common.cache.tier.TieredSpilloverCacheSettings.TIERED_SPILLOVER_SEGMENTS; +import static org.opensearch.common.cache.tier.TieredSpilloverCacheSettings.TOOK_TIME_POLICY_CONCRETE_SETTINGS_MAP; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.mock;