forked from opensearch-project/OpenSearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
43 changed files
with
1,451 additions
and
476 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
plugins/repository-azure/licenses/azure-identity-1.11.4.jar.sha1
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
plugins/repository-azure/licenses/azure-identity-1.13.0.jar.sha1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
54b44a74636322d06e9dc42d611a9f12a0966790 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cd1daa94b81bd97153536b661c31295f99cbb8e7 |
1 change: 0 additions & 1 deletion
1
plugins/repository-azure/licenses/msal4j-persistence-extension-1.2.0.jar.sha1
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
plugins/repository-azure/licenses/msal4j-persistence-extension-1.3.0.jar.sha1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
8a8ef1517d27a5b4de1512ef94679bdb59f210b6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
server/src/main/java/org/opensearch/search/ResourceType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
package org.opensearch.search; | ||
|
||
/** | ||
* Enum to hold the resource type | ||
*/ | ||
public enum ResourceType { | ||
CPU("cpu"), | ||
JVM("jvm"); | ||
|
||
private final String name; | ||
|
||
ResourceType(String name) { | ||
this.name = name; | ||
} | ||
|
||
/** | ||
* The string match here is case-sensitive | ||
* @param s name matching the resource type name | ||
* @return a {@link ResourceType} | ||
*/ | ||
public static ResourceType fromName(String s) { | ||
for (ResourceType resourceType : values()) { | ||
if (resourceType.getName().equals(s)) { | ||
return resourceType; | ||
} | ||
} | ||
throw new IllegalArgumentException("Unknown resource type: [" + s + "]"); | ||
} | ||
|
||
private String getName() { | ||
return name; | ||
} | ||
} |
Oops, something went wrong.