Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ResourceType API annotations and deprecations #15496

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -18,8 +18,12 @@

/**
* Enum to hold the resource type
*
* @opensearch.api
*
*/
@PublicApi(since = "2.x")
@DeprecatedApi(since = "2.17.0")

Check warning on line 25 in server/src/main/java/org/opensearch/search/ResourceType.java

View check run for this annotation

Codecov / codecov/patch

server/src/main/java/org/opensearch/search/ResourceType.java#L25

Added line #L25 was not covered by tests
@Deprecated(forRemoval = true)
public enum ResourceType {
CPU("cpu", task -> task.getTotalResourceUtilization(ResourceStats.CPU)),
MEMORY("memory", task -> task.getTotalResourceUtilization(ResourceStats.MEMORY));
Expand Down
5 changes: 4 additions & 1 deletion server/src/main/java/org/opensearch/wlm/ResourceType.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@

/**
* Enum to hold the resource type
*
* @opensearch.api
*
*/
@PublicApi(since = "2.x")
@PublicApi(since = "2.17.0")
reta marked this conversation as resolved.
Show resolved Hide resolved
public enum ResourceType {
CPU("cpu", task -> task.getTotalResourceUtilization(ResourceStats.CPU), true),
MEMORY("memory", task -> task.getTotalResourceUtilization(ResourceStats.MEMORY), true);
Expand Down
Loading