Skip to content

Commit

Permalink
spotless
Browse files Browse the repository at this point in the history
Signed-off-by: Kiran Prakash <awskiran@amazon.com>
  • Loading branch information
kiranprakash154 committed Mar 27, 2024
1 parent 0ce777e commit f237955
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ public IndicesRequestCacheIT(Settings settings) {
@ParametersFactory
public static Collection<Object[]> parameters() {
return Arrays.asList(
new Object[]{Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING.getKey(), false).build()},
new Object[]{Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING.getKey(), true).build()},
new Object[]{Settings.builder().put(FeatureFlags.PLUGGABLE_CACHE, "true").build()},
new Object[]{Settings.builder().put(FeatureFlags.PLUGGABLE_CACHE, "false").build()}
new Object[] { Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING.getKey(), false).build() },
new Object[] { Settings.builder().put(CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING.getKey(), true).build() },
new Object[] { Settings.builder().put(FeatureFlags.PLUGGABLE_CACHE, "true").build() },
new Object[] { Settings.builder().put(FeatureFlags.PLUGGABLE_CACHE, "false").build() }
);
}

Expand All @@ -109,7 +109,8 @@ public void testCacheAggs() throws Exception {
.put(IndicesRequestCache.INDEX_CACHE_REQUEST_ENABLED_SETTING.getKey(), true)
.put(SETTING_NUMBER_OF_SHARDS, 1)
.put(SETTING_NUMBER_OF_REPLICAS, 0)
).get()
)
.get()
);
indexRandom(
true,
Expand Down Expand Up @@ -1106,12 +1107,6 @@ private static void assertCacheState(Client client, String index, long expectedH
}

private static RequestCacheStats getRequestCacheStats(Client client, String index) {
return client.admin()
.indices()
.prepareStats(index)
.setRequestCache(true)
.get()
.getTotal()
.getRequestCache();
return client.admin().indices().prepareStats(index).setRequestCache(true).get().getTotal().getRequestCache();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ public final class IndicesRequestCache implements RemovalListener<IndicesRequest
* since we are checking on the cluster state IndexMetadata always.
*/

public static final String SETTING_INDICES_REQUEST_CACHE_STALENESS_THRESHOLD_SETTING = "indices.requests.cache.cleanup.staleness_threshold";
public static final String SETTING_INDICES_REQUEST_CACHE_STALENESS_THRESHOLD_SETTING =
"indices.requests.cache.cleanup.staleness_threshold";
public static final String SETTING_INDICES_REQUEST_CACHE_CLEAN_INTERVAL_SETTING = "indices.requests.cache.cleanup.interval";

public static final Setting<Boolean> INDEX_CACHE_REQUEST_ENABLED_SETTING = Setting.boolSetting(
Expand Down

0 comments on commit f237955

Please sign in to comment.