Skip to content

Commit

Permalink
querygroup service
Browse files Browse the repository at this point in the history
Signed-off-by: Kiran Prakash <[email protected]
  • Loading branch information
kiranprakash154 committed Aug 31, 2024
1 parent b189670 commit 8a11078
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1404,7 +1404,7 @@ public Builder remove(final QueryGroup queryGroup) {
return queryGroups(existing);
}

private Map<String, QueryGroup> getQueryGroups() {
public Map<String, QueryGroup> getQueryGroups() {
return Optional.ofNullable(this.customs.get(QueryGroupMetadata.TYPE))
.map(o -> (QueryGroupMetadata) o)
.map(QueryGroupMetadata::queryGroups)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ public class WorkloadManagementSettings {
private static final Double DEFAULT_NODE_LEVEL_MEMORY_CANCELLATION_THRESHOLD = 0.9;
private static final Double DEFAULT_NODE_LEVEL_CPU_REJECTION_THRESHOLD = 0.8;
private static final Double DEFAULT_NODE_LEVEL_CPU_CANCELLATION_THRESHOLD = 0.9;
private static final Long DEFAULT_QUERYGROUP_SERVICE_RUN_INTERVAL_MILLIS = 1000L;

public static final double NODE_LEVEL_MEMORY_CANCELLATION_THRESHOLD_MAX_VALUE = 0.95;
public static final double NODE_LEVEL_MEMORY_REJECTION_THRESHOLD_MAX_VALUE = 0.9;
public static final double NODE_LEVEL_CPU_CANCELLATION_THRESHOLD_MAX_VALUE = 0.95;
Expand Down Expand Up @@ -82,6 +84,19 @@ public class WorkloadManagementSettings {
Setting.Property.Dynamic,
Setting.Property.NodeScope
);
/**
* Setting name for Query Group Service run interval
*/
public static final String QUERYGROUP_SERVICE_RUN_INTERVAL_SETTING_NAME = "wlm.query_group.service.run_interval";
/**
* Setting to control the run interval of Query Group Service
*/
public static final Setting<Long> QUERYGROUP_SERVICE_RUN_INTERVAL_SETTING = Setting.longSetting(
QUERYGROUP_SERVICE_RUN_INTERVAL_SETTING_NAME,
DEFAULT_QUERYGROUP_SERVICE_RUN_INTERVAL_MILLIS,
1000,
Setting.Property.NodeScope
);

/**
* QueryGroup service settings constructor
Expand Down

0 comments on commit 8a11078

Please sign in to comment.