Skip to content

Commit

Permalink
Update QueryGroupService.java
Browse files Browse the repository at this point in the history
Signed-off-by: Kiran Prakash <awskiran@amazon.com>
  • Loading branch information
kiranprakash154 committed Aug 30, 2024
1 parent 36c349a commit d8c31ee
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions server/src/main/java/org/opensearch/wlm/QueryGroupService.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,13 @@
import org.opensearch.cluster.service.ClusterService;
import org.opensearch.common.inject.Inject;
import org.opensearch.common.lifecycle.AbstractLifecycleComponent;
import org.opensearch.common.settings.ClusterSettings;
import org.opensearch.common.settings.Settings;
import org.opensearch.common.unit.TimeValue;
import org.opensearch.monitor.jvm.JvmStats;
import org.opensearch.monitor.process.ProcessProbe;
import org.opensearch.search.ResourceType;
import org.opensearch.search.backpressure.settings.NodeDuressSettings;
import org.opensearch.search.backpressure.trackers.NodeDuressTrackers;
import org.opensearch.threadpool.Scheduler;
import org.opensearch.threadpool.ThreadPool;
import org.opensearch.wlm.cancellation.DefaultTaskCancellation;
import org.opensearch.wlm.cancellation.DefaultTaskSelectionStrategy;
import org.opensearch.wlm.tracker.QueryGroupResourceUsageTrackerService;
import org.opensearch.threadpool.Scheduler;
import org.opensearch.threadpool.ThreadPool;

import java.io.IOException;
import java.util.EnumMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
Expand Down Expand Up @@ -92,7 +83,7 @@ protected void doRun() {
*/
@Override
protected void doStart() {
if(!workloadManagementSettings.queryGroupServiceEnabled()) {
if (!workloadManagementSettings.queryGroupServiceEnabled()) {
return;
}
scheduledFuture = threadPool.scheduleWithFixedDelay(() -> {
Expand All @@ -106,7 +97,7 @@ protected void doStart() {

@Override
protected void doStop() {
if(workloadManagementSettings.queryGroupServiceEnabled()) {
if (workloadManagementSettings.queryGroupServiceEnabled()) {
return;
}
if (scheduledFuture != null) {
Expand Down

0 comments on commit d8c31ee

Please sign in to comment.