Skip to content

Commit

Permalink
Fix ResourceType API annottations and deprecations
Browse files Browse the repository at this point in the history
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
  • Loading branch information
reta committed Aug 29, 2024
1 parent c2574a5 commit 6691ebd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions server/src/main/java/org/opensearch/search/ResourceType.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

package org.opensearch.search;

import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.annotation.DeprecatedApi;
import org.opensearch.core.common.io.stream.StreamOutput;
import org.opensearch.core.tasks.resourcetracker.ResourceStats;
import org.opensearch.tasks.Task;
Expand All @@ -19,7 +19,8 @@
/**
* Enum to hold the resource type
*/
@PublicApi(since = "2.x")
@DeprecatedApi(since = "2.17.0")
@Deprecated(forRemoval = true)
public enum ResourceType {
CPU("cpu", task -> task.getTotalResourceUtilization(ResourceStats.CPU)),
MEMORY("memory", task -> task.getTotalResourceUtilization(ResourceStats.MEMORY));
Expand Down
2 changes: 1 addition & 1 deletion server/src/main/java/org/opensearch/wlm/ResourceType.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* Enum to hold the resource type
*/
@PublicApi(since = "2.x")
@PublicApi(since = "2.17.0")
public enum ResourceType {
CPU("cpu", task -> task.getTotalResourceUtilization(ResourceStats.CPU), true),
MEMORY("memory", task -> task.getTotalResourceUtilization(ResourceStats.MEMORY), true);
Expand Down

0 comments on commit 6691ebd

Please sign in to comment.