From 20e56f19a7af6da933b4f839cf92b028c7c8701b Mon Sep 17 00:00:00 2001 From: Ruirui Zhang Date: Tue, 20 Aug 2024 13:39:23 -0700 Subject: [PATCH] address comments Signed-off-by: Ruirui Zhang --- .../common/settings/ClusterSettings.java | 12 +-- .../search/query_group/package-info.java | 12 --- .../WorkloadManagementSettings.java} | 6 +- .../WorkloadManagementSettingsTests.java} | 96 +++++++++---------- 4 files changed, 57 insertions(+), 69 deletions(-) delete mode 100644 server/src/main/java/org/opensearch/search/query_group/package-info.java rename server/src/main/java/org/opensearch/{search/query_group/QueryGroupServiceSettings.java => wlm/WorkloadManagementSettings.java} (98%) rename server/src/test/java/org/opensearch/{search/query_group/QueryGroupServiceSettingsTests.java => wlm/WorkloadManagementSettingsTests.java} (66%) diff --git a/server/src/main/java/org/opensearch/common/settings/ClusterSettings.java b/server/src/main/java/org/opensearch/common/settings/ClusterSettings.java index 6efb3b4febcb4..49ef87838ed2e 100644 --- a/server/src/main/java/org/opensearch/common/settings/ClusterSettings.java +++ b/server/src/main/java/org/opensearch/common/settings/ClusterSettings.java @@ -159,7 +159,6 @@ import org.opensearch.search.backpressure.settings.SearchShardTaskSettings; import org.opensearch.search.backpressure.settings.SearchTaskSettings; import org.opensearch.search.fetch.subphase.highlight.FastVectorHighlighter; -import org.opensearch.search.query_group.QueryGroupServiceSettings; import org.opensearch.snapshots.InternalSnapshotsInfoService; import org.opensearch.snapshots.SnapshotsService; import org.opensearch.tasks.TaskCancellationMonitoringSettings; @@ -174,6 +173,7 @@ import org.opensearch.transport.SniffConnectionStrategy; import org.opensearch.transport.TransportSettings; import org.opensearch.watcher.ResourceWatcherService; +import org.opensearch.wlm.WorkloadManagementSettings; import java.util.Arrays; import java.util.Collections; @@ -769,11 +769,11 @@ public void apply(Settings value, Settings current, Settings previous) { SystemTemplatesService.SETTING_APPLICATION_BASED_CONFIGURATION_TEMPLATES_ENABLED, - // QueryGroup settings - QueryGroupServiceSettings.NODE_LEVEL_CPU_REJECTION_THRESHOLD, - QueryGroupServiceSettings.NODE_LEVEL_CPU_CANCELLATION_THRESHOLD, - QueryGroupServiceSettings.NODE_LEVEL_MEMORY_REJECTION_THRESHOLD, - QueryGroupServiceSettings.NODE_LEVEL_MEMORY_CANCELLATION_THRESHOLD + // WorkloadManagement settings + WorkloadManagementSettings.NODE_LEVEL_CPU_REJECTION_THRESHOLD, + WorkloadManagementSettings.NODE_LEVEL_CPU_CANCELLATION_THRESHOLD, + WorkloadManagementSettings.NODE_LEVEL_MEMORY_REJECTION_THRESHOLD, + WorkloadManagementSettings.NODE_LEVEL_MEMORY_CANCELLATION_THRESHOLD ) ) ); diff --git a/server/src/main/java/org/opensearch/search/query_group/package-info.java b/server/src/main/java/org/opensearch/search/query_group/package-info.java deleted file mode 100644 index ee6c5692f32c7..0000000000000 --- a/server/src/main/java/org/opensearch/search/query_group/package-info.java +++ /dev/null @@ -1,12 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -/** - * QueryGroup related settings - */ -package org.opensearch.search.query_group; diff --git a/server/src/main/java/org/opensearch/search/query_group/QueryGroupServiceSettings.java b/server/src/main/java/org/opensearch/wlm/WorkloadManagementSettings.java similarity index 98% rename from server/src/main/java/org/opensearch/search/query_group/QueryGroupServiceSettings.java rename to server/src/main/java/org/opensearch/wlm/WorkloadManagementSettings.java index 396887a3fffc9..b371361b632c3 100644 --- a/server/src/main/java/org/opensearch/search/query_group/QueryGroupServiceSettings.java +++ b/server/src/main/java/org/opensearch/wlm/WorkloadManagementSettings.java @@ -6,7 +6,7 @@ * compatible open source license. */ -package org.opensearch.search.query_group; +package org.opensearch.wlm; import org.opensearch.common.settings.ClusterSettings; import org.opensearch.common.settings.Setting; @@ -15,7 +15,7 @@ /** * Main class to declare the QueryGroup feature related settings */ -public class QueryGroupServiceSettings { +public class WorkloadManagementSettings { private static final Double DEFAULT_NODE_LEVEL_MEMORY_REJECTION_THRESHOLD = 0.8; private static final Double DEFAULT_NODE_LEVEL_MEMORY_CANCELLATION_THRESHOLD = 0.9; private static final Double DEFAULT_NODE_LEVEL_CPU_REJECTION_THRESHOLD = 0.8; @@ -88,7 +88,7 @@ public class QueryGroupServiceSettings { * @param settings - QueryGroup service settings * @param clusterSettings - QueryGroup cluster settings */ - public QueryGroupServiceSettings(Settings settings, ClusterSettings clusterSettings) { + public WorkloadManagementSettings(Settings settings, ClusterSettings clusterSettings) { nodeLevelMemoryCancellationThreshold = NODE_LEVEL_MEMORY_CANCELLATION_THRESHOLD.get(settings); nodeLevelMemoryRejectionThreshold = NODE_LEVEL_MEMORY_REJECTION_THRESHOLD.get(settings); nodeLevelCpuCancellationThreshold = NODE_LEVEL_CPU_CANCELLATION_THRESHOLD.get(settings); diff --git a/server/src/test/java/org/opensearch/search/query_group/QueryGroupServiceSettingsTests.java b/server/src/test/java/org/opensearch/wlm/WorkloadManagementSettingsTests.java similarity index 66% rename from server/src/test/java/org/opensearch/search/query_group/QueryGroupServiceSettingsTests.java rename to server/src/test/java/org/opensearch/wlm/WorkloadManagementSettingsTests.java index 021b399d8c87a..888ab592e96b5 100644 --- a/server/src/test/java/org/opensearch/search/query_group/QueryGroupServiceSettingsTests.java +++ b/server/src/test/java/org/opensearch/wlm/WorkloadManagementSettingsTests.java @@ -6,49 +6,49 @@ * compatible open source license. */ -package org.opensearch.search.query_group; +package org.opensearch.wlm; import org.opensearch.common.settings.ClusterSettings; import org.opensearch.common.settings.Settings; import org.opensearch.test.OpenSearchTestCase; -import static org.opensearch.search.query_group.QueryGroupServiceSettings.NODE_CPU_CANCELLATION_THRESHOLD_SETTING_NAME; -import static org.opensearch.search.query_group.QueryGroupServiceSettings.NODE_CPU_REJECTION_THRESHOLD_SETTING_NAME; -import static org.opensearch.search.query_group.QueryGroupServiceSettings.NODE_MEMORY_CANCELLATION_THRESHOLD_SETTING_NAME; -import static org.opensearch.search.query_group.QueryGroupServiceSettings.NODE_MEMORY_REJECTION_THRESHOLD_SETTING_NAME; +import static org.opensearch.wlm.WorkloadManagementSettings.NODE_CPU_CANCELLATION_THRESHOLD_SETTING_NAME; +import static org.opensearch.wlm.WorkloadManagementSettings.NODE_CPU_REJECTION_THRESHOLD_SETTING_NAME; +import static org.opensearch.wlm.WorkloadManagementSettings.NODE_MEMORY_CANCELLATION_THRESHOLD_SETTING_NAME; +import static org.opensearch.wlm.WorkloadManagementSettings.NODE_MEMORY_REJECTION_THRESHOLD_SETTING_NAME; -public class QueryGroupServiceSettingsTests extends OpenSearchTestCase { +public class WorkloadManagementSettingsTests extends OpenSearchTestCase { /** * Tests the invalid value for {@code query_group.node.memory_rejection_threshold} * When the value is set more than {@code query_group.node.memory_cancellation_threshold} accidentally during - * new feature development. This test is to ensure that {@link QueryGroupServiceSettings} holds the + * new feature development. This test is to ensure that {@link WorkloadManagementSettings} holds the * invariant {@code nodeLevelRejectionThreshold < nodeLevelCancellationThreshold} */ - public void testInvalidMemoryInstantiationOfQueryGroupServiceSettings() { + public void testInvalidMemoryInstantiationOfWorkloadManagementSettings() { Settings settings = Settings.builder() .put(NODE_MEMORY_REJECTION_THRESHOLD_SETTING_NAME, 0.8) .put(NODE_MEMORY_CANCELLATION_THRESHOLD_SETTING_NAME, 0.7) .build(); ClusterSettings cs = new ClusterSettings(Settings.EMPTY, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS); - assertThrows(IllegalArgumentException.class, () -> new QueryGroupServiceSettings(settings, cs)); + assertThrows(IllegalArgumentException.class, () -> new WorkloadManagementSettings(settings, cs)); } /** * Tests the invalid value for {@code query_group.node.cpu_rejection_threshold} * When the value is set more than {@code query_group.node.cpu_cancellation_threshold} accidentally during - * new feature development. This test is to ensure that {@link QueryGroupServiceSettings} holds the + * new feature development. This test is to ensure that {@link WorkloadManagementSettings} holds the * invariant {@code nodeLevelRejectionThreshold < nodeLevelCancellationThreshold} */ - public void testInvalidCpuInstantiationOfQueryGroupServiceSettings() { + public void testInvalidCpuInstantiationOfWorkloadManagementSettings() { Settings settings = Settings.builder() .put(NODE_CPU_REJECTION_THRESHOLD_SETTING_NAME, 0.8) .put(NODE_CPU_CANCELLATION_THRESHOLD_SETTING_NAME, 0.7) .build(); ClusterSettings cs = new ClusterSettings(Settings.EMPTY, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS); - assertThrows(IllegalArgumentException.class, () -> new QueryGroupServiceSettings(settings, cs)); + assertThrows(IllegalArgumentException.class, () -> new WorkloadManagementSettings(settings, cs)); } /** @@ -58,9 +58,9 @@ public void testInvalidCpuInstantiationOfQueryGroupServiceSettings() { public void testValidNodeLevelCpuRejectionThresholdCase1() { Settings settings = Settings.builder().put(NODE_CPU_CANCELLATION_THRESHOLD_SETTING_NAME, 0.8).build(); ClusterSettings cs = new ClusterSettings(Settings.EMPTY, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS); - QueryGroupServiceSettings queryGroupServiceSettings = new QueryGroupServiceSettings(settings, cs); - queryGroupServiceSettings.setNodeLevelCpuRejectionThreshold(0.7); - assertEquals(0.7, queryGroupServiceSettings.getNodeLevelCpuRejectionThreshold(), 1e-9); + WorkloadManagementSettings workloadManagementSettings = new WorkloadManagementSettings(settings, cs); + workloadManagementSettings.setNodeLevelCpuRejectionThreshold(0.7); + assertEquals(0.7, workloadManagementSettings.getNodeLevelCpuRejectionThreshold(), 1e-9); } /** @@ -69,8 +69,8 @@ public void testValidNodeLevelCpuRejectionThresholdCase1() { public void testValidNodeLevelCpuRejectionThresholdCase2() { Settings settings = Settings.builder().put(NODE_CPU_REJECTION_THRESHOLD_SETTING_NAME, 0.79).build(); ClusterSettings cs = new ClusterSettings(Settings.EMPTY, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS); - QueryGroupServiceSettings queryGroupServiceSettings = new QueryGroupServiceSettings(settings, cs); - assertEquals(0.79, queryGroupServiceSettings.getNodeLevelCpuRejectionThreshold(), 1e-9); + WorkloadManagementSettings workloadManagementSettings = new WorkloadManagementSettings(settings, cs); + assertEquals(0.79, workloadManagementSettings.getNodeLevelCpuRejectionThreshold(), 1e-9); } /** @@ -80,8 +80,8 @@ public void testValidNodeLevelCpuRejectionThresholdCase2() { public void testInvalidNodeLevelCpuRejectionThresholdCase1() { Settings settings = Settings.builder().put(NODE_CPU_REJECTION_THRESHOLD_SETTING_NAME, 0.8).build(); ClusterSettings cs = new ClusterSettings(Settings.EMPTY, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS); - QueryGroupServiceSettings queryGroupServiceSettings = new QueryGroupServiceSettings(settings, cs); - assertThrows(IllegalArgumentException.class, () -> queryGroupServiceSettings.setNodeLevelCpuRejectionThreshold(0.95)); + WorkloadManagementSettings workloadManagementSettings = new WorkloadManagementSettings(settings, cs); + assertThrows(IllegalArgumentException.class, () -> workloadManagementSettings.setNodeLevelCpuRejectionThreshold(0.95)); } /** @@ -94,8 +94,8 @@ public void testInvalidNodeLevelCpuRejectionThresholdCase2() { .put(NODE_CPU_CANCELLATION_THRESHOLD_SETTING_NAME, 0.8) .build(); ClusterSettings cs = new ClusterSettings(Settings.EMPTY, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS); - QueryGroupServiceSettings queryGroupServiceSettings = new QueryGroupServiceSettings(settings, cs); - assertThrows(IllegalArgumentException.class, () -> queryGroupServiceSettings.setNodeLevelCpuRejectionThreshold(0.85)); + WorkloadManagementSettings workloadManagementSettings = new WorkloadManagementSettings(settings, cs); + assertThrows(IllegalArgumentException.class, () -> workloadManagementSettings.setNodeLevelCpuRejectionThreshold(0.85)); } /** @@ -104,8 +104,8 @@ public void testInvalidNodeLevelCpuRejectionThresholdCase2() { public void testValidNodeLevelCpuCancellationThresholdCase1() { Settings settings = Settings.builder().put(NODE_CPU_CANCELLATION_THRESHOLD_SETTING_NAME, 0.8).build(); ClusterSettings cs = new ClusterSettings(Settings.EMPTY, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS); - QueryGroupServiceSettings queryGroupServiceSettings = new QueryGroupServiceSettings(settings, cs); - assertEquals(0.8, queryGroupServiceSettings.getNodeLevelCpuRejectionThreshold(), 1e-9); + WorkloadManagementSettings workloadManagementSettings = new WorkloadManagementSettings(settings, cs); + assertEquals(0.8, workloadManagementSettings.getNodeLevelCpuRejectionThreshold(), 1e-9); } /** @@ -115,9 +115,9 @@ public void testValidNodeLevelCpuCancellationThresholdCase1() { public void testValidNodeLevelCpuCancellationThresholdCase2() { Settings settings = Settings.builder().put(NODE_CPU_REJECTION_THRESHOLD_SETTING_NAME, 0.8).build(); ClusterSettings cs = new ClusterSettings(Settings.EMPTY, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS); - QueryGroupServiceSettings queryGroupServiceSettings = new QueryGroupServiceSettings(settings, cs); - queryGroupServiceSettings.setNodeLevelCpuCancellationThreshold(0.83); - assertEquals(0.83, queryGroupServiceSettings.getNodeLevelCpuCancellationThreshold(), 1e-9); + WorkloadManagementSettings workloadManagementSettings = new WorkloadManagementSettings(settings, cs); + workloadManagementSettings.setNodeLevelCpuCancellationThreshold(0.83); + assertEquals(0.83, workloadManagementSettings.getNodeLevelCpuCancellationThreshold(), 1e-9); } /** @@ -127,8 +127,8 @@ public void testValidNodeLevelCpuCancellationThresholdCase2() { public void testInvalidNodeLevelCpuCancellationThresholdCase1() { Settings settings = Settings.builder().put(NODE_CPU_CANCELLATION_THRESHOLD_SETTING_NAME, 0.9).build(); ClusterSettings cs = new ClusterSettings(Settings.EMPTY, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS); - QueryGroupServiceSettings queryGroupServiceSettings = new QueryGroupServiceSettings(settings, cs); - assertThrows(IllegalArgumentException.class, () -> queryGroupServiceSettings.setNodeLevelCpuCancellationThreshold(0.96)); + WorkloadManagementSettings workloadManagementSettings = new WorkloadManagementSettings(settings, cs); + assertThrows(IllegalArgumentException.class, () -> workloadManagementSettings.setNodeLevelCpuCancellationThreshold(0.96)); } /** @@ -141,8 +141,8 @@ public void testInvalidNodeLevelCpuCancellationThresholdCase2() { .put(NODE_CPU_CANCELLATION_THRESHOLD_SETTING_NAME, 0.8) .build(); ClusterSettings cs = new ClusterSettings(Settings.EMPTY, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS); - QueryGroupServiceSettings queryGroupServiceSettings = new QueryGroupServiceSettings(settings, cs); - assertThrows(IllegalArgumentException.class, () -> queryGroupServiceSettings.setNodeLevelCpuCancellationThreshold(0.65)); + WorkloadManagementSettings workloadManagementSettings = new WorkloadManagementSettings(settings, cs); + assertThrows(IllegalArgumentException.class, () -> workloadManagementSettings.setNodeLevelCpuCancellationThreshold(0.65)); } /** @@ -151,8 +151,8 @@ public void testInvalidNodeLevelCpuCancellationThresholdCase2() { public void testValidNodeLevelMemoryCancellationThresholdCase1() { Settings settings = Settings.builder().put(NODE_MEMORY_CANCELLATION_THRESHOLD_SETTING_NAME, 0.8).build(); ClusterSettings cs = new ClusterSettings(Settings.EMPTY, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS); - QueryGroupServiceSettings queryGroupServiceSettings = new QueryGroupServiceSettings(settings, cs); - assertEquals(0.8, queryGroupServiceSettings.getNodeLevelMemoryCancellationThreshold(), 1e-9); + WorkloadManagementSettings workloadManagementSettings = new WorkloadManagementSettings(settings, cs); + assertEquals(0.8, workloadManagementSettings.getNodeLevelMemoryCancellationThreshold(), 1e-9); } /** @@ -162,9 +162,9 @@ public void testValidNodeLevelMemoryCancellationThresholdCase1() { public void testValidNodeLevelMemoryCancellationThresholdCase2() { Settings settings = Settings.builder().put(NODE_MEMORY_REJECTION_THRESHOLD_SETTING_NAME, 0.8).build(); ClusterSettings cs = new ClusterSettings(Settings.EMPTY, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS); - QueryGroupServiceSettings queryGroupServiceSettings = new QueryGroupServiceSettings(settings, cs); - queryGroupServiceSettings.setNodeLevelMemoryCancellationThreshold(0.83); - assertEquals(0.83, queryGroupServiceSettings.getNodeLevelMemoryCancellationThreshold(), 1e-9); + WorkloadManagementSettings workloadManagementSettings = new WorkloadManagementSettings(settings, cs); + workloadManagementSettings.setNodeLevelMemoryCancellationThreshold(0.83); + assertEquals(0.83, workloadManagementSettings.getNodeLevelMemoryCancellationThreshold(), 1e-9); } /** @@ -174,8 +174,8 @@ public void testValidNodeLevelMemoryCancellationThresholdCase2() { public void testInvalidNodeLevelMemoryCancellationThresholdCase1() { Settings settings = Settings.builder().put(NODE_MEMORY_CANCELLATION_THRESHOLD_SETTING_NAME, 0.9).build(); ClusterSettings cs = new ClusterSettings(Settings.EMPTY, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS); - QueryGroupServiceSettings queryGroupServiceSettings = new QueryGroupServiceSettings(settings, cs); - assertThrows(IllegalArgumentException.class, () -> queryGroupServiceSettings.setNodeLevelMemoryCancellationThreshold(0.96)); + WorkloadManagementSettings workloadManagementSettings = new WorkloadManagementSettings(settings, cs); + assertThrows(IllegalArgumentException.class, () -> workloadManagementSettings.setNodeLevelMemoryCancellationThreshold(0.96)); } /** @@ -188,8 +188,8 @@ public void testInvalidNodeLevelMemoryCancellationThresholdCase2() { .put(NODE_MEMORY_CANCELLATION_THRESHOLD_SETTING_NAME, 0.8) .build(); ClusterSettings cs = new ClusterSettings(Settings.EMPTY, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS); - QueryGroupServiceSettings queryGroupServiceSettings = new QueryGroupServiceSettings(settings, cs); - assertThrows(IllegalArgumentException.class, () -> queryGroupServiceSettings.setNodeLevelMemoryCancellationThreshold(0.65)); + WorkloadManagementSettings workloadManagementSettings = new WorkloadManagementSettings(settings, cs); + assertThrows(IllegalArgumentException.class, () -> workloadManagementSettings.setNodeLevelMemoryCancellationThreshold(0.65)); } /** @@ -198,8 +198,8 @@ public void testInvalidNodeLevelMemoryCancellationThresholdCase2() { public void testValidNodeLevelMemoryRejectionThresholdCase1() { Settings settings = Settings.builder().put(NODE_MEMORY_REJECTION_THRESHOLD_SETTING_NAME, 0.79).build(); ClusterSettings cs = new ClusterSettings(Settings.EMPTY, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS); - QueryGroupServiceSettings queryGroupServiceSettings = new QueryGroupServiceSettings(settings, cs); - assertEquals(0.79, queryGroupServiceSettings.getNodeLevelMemoryRejectionThreshold(), 1e-9); + WorkloadManagementSettings workloadManagementSettings = new WorkloadManagementSettings(settings, cs); + assertEquals(0.79, workloadManagementSettings.getNodeLevelMemoryRejectionThreshold(), 1e-9); } /** @@ -209,9 +209,9 @@ public void testValidNodeLevelMemoryRejectionThresholdCase1() { public void testValidNodeLevelMemoryRejectionThresholdCase2() { Settings settings = Settings.builder().put(NODE_MEMORY_CANCELLATION_THRESHOLD_SETTING_NAME, 0.9).build(); ClusterSettings cs = new ClusterSettings(Settings.EMPTY, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS); - QueryGroupServiceSettings queryGroupServiceSettings = new QueryGroupServiceSettings(settings, cs); - queryGroupServiceSettings.setNodeLevelMemoryRejectionThreshold(0.86); - assertEquals(0.86, queryGroupServiceSettings.getNodeLevelMemoryRejectionThreshold(), 1e-9); + WorkloadManagementSettings workloadManagementSettings = new WorkloadManagementSettings(settings, cs); + workloadManagementSettings.setNodeLevelMemoryRejectionThreshold(0.86); + assertEquals(0.86, workloadManagementSettings.getNodeLevelMemoryRejectionThreshold(), 1e-9); } /** @@ -221,8 +221,8 @@ public void testValidNodeLevelMemoryRejectionThresholdCase2() { public void testInvalidNodeLevelMemoryRejectionThresholdCase1() { Settings settings = Settings.builder().put(NODE_MEMORY_CANCELLATION_THRESHOLD_SETTING_NAME, 0.9).build(); ClusterSettings cs = new ClusterSettings(Settings.EMPTY, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS); - QueryGroupServiceSettings queryGroupServiceSettings = new QueryGroupServiceSettings(settings, cs); - assertThrows(IllegalArgumentException.class, () -> queryGroupServiceSettings.setNodeLevelMemoryRejectionThreshold(0.92)); + WorkloadManagementSettings workloadManagementSettings = new WorkloadManagementSettings(settings, cs); + assertThrows(IllegalArgumentException.class, () -> workloadManagementSettings.setNodeLevelMemoryRejectionThreshold(0.92)); } /** @@ -235,7 +235,7 @@ public void testInvalidNodeLevelMemoryRejectionThresholdCase2() { .put(NODE_MEMORY_CANCELLATION_THRESHOLD_SETTING_NAME, 0.8) .build(); ClusterSettings cs = new ClusterSettings(Settings.EMPTY, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS); - QueryGroupServiceSettings queryGroupServiceSettings = new QueryGroupServiceSettings(settings, cs); - assertThrows(IllegalArgumentException.class, () -> queryGroupServiceSettings.setNodeLevelMemoryRejectionThreshold(0.85)); + WorkloadManagementSettings workloadManagementSettings = new WorkloadManagementSettings(settings, cs); + assertThrows(IllegalArgumentException.class, () -> workloadManagementSettings.setNodeLevelMemoryRejectionThreshold(0.85)); } }