Skip to content

Commit

Permalink
Companion changes for moving ExtensionRequest to Protobuf (#647)
Browse files Browse the repository at this point in the history
* Companion changes for moving ExtensionRequest to Protobuf

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>

* Fixing companion changes

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>

* Companion changes for moving ExtensionRequest to Protobuf

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>

---------

Signed-off-by: Sarat Vemulapalli <vemulapallisarat@gmail.com>
(cherry picked from commit d122039)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] committed Apr 21, 2023
1 parent 32292f8 commit 84ba9ed
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/java/org/opensearch/sdk/ExtensionsRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import org.opensearch.cluster.metadata.IndexNameExpressionResolver;
import org.opensearch.cluster.node.DiscoveryNode;
import org.opensearch.common.io.stream.NamedWriteableRegistry;
import org.opensearch.extensions.proto.ExtensionRequestProto;
import org.opensearch.extensions.rest.ExtensionRestRequest;
import org.opensearch.extensions.rest.RegisterRestActionsRequest;
import org.opensearch.extensions.settings.RegisterCustomSettingsRequest;
Expand All @@ -28,7 +29,6 @@
import org.opensearch.extensions.AddSettingsUpdateConsumerRequest;
import org.opensearch.extensions.UpdateSettingsRequest;
import org.opensearch.extensions.action.ExtensionActionRequest;
import org.opensearch.extensions.ExtensionsManager.RequestType;
import org.opensearch.extensions.ExtensionRequest;
import org.opensearch.extensions.ExtensionsManager;
import org.opensearch.index.IndicesModuleRequest;
Expand Down Expand Up @@ -544,7 +544,7 @@ public void sendRegisterCustomSettingsRequest(TransportService transportService)

private void sendGenericRequestWithExceptionHandling(
TransportService transportService,
RequestType requestType,
ExtensionRequestProto.RequestType requestType,
String orchestratorNameString,
TransportResponseHandler<? extends TransportResponse> responseHandler
) {
Expand All @@ -570,7 +570,7 @@ public ClusterState sendClusterStateRequest(TransportService transportService) {
transportService.sendRequest(
opensearchNode,
ExtensionsManager.REQUEST_EXTENSION_CLUSTER_STATE,
new ExtensionRequest(ExtensionsManager.RequestType.REQUEST_EXTENSION_CLUSTER_STATE),
new ExtensionRequest(ExtensionRequestProto.RequestType.REQUEST_EXTENSION_CLUSTER_STATE),
clusterStateResponseHandler
);
// Wait on cluster state response
Expand Down Expand Up @@ -598,7 +598,7 @@ public List<DiscoveryExtensionNode> sendExtensionDependencyRequest(TransportServ
transportService.sendRequest(
opensearchNode,
ExtensionsManager.REQUEST_EXTENSION_DEPENDENCY_INFORMATION,
new ExtensionRequest(ExtensionsManager.RequestType.REQUEST_EXTENSION_DEPENDENCY_INFORMATION, uniqueId),
new ExtensionRequest(ExtensionRequestProto.RequestType.REQUEST_EXTENSION_DEPENDENCY_INFORMATION, uniqueId),
extensionDependencyResponseHandler
);
// Wait on Extension Dependency response
Expand All @@ -621,7 +621,7 @@ public List<DiscoveryExtensionNode> sendExtensionDependencyRequest(TransportServ
public void sendClusterSettingsRequest(TransportService transportService) {
sendGenericRequestWithExceptionHandling(
transportService,
ExtensionsManager.RequestType.REQUEST_EXTENSION_CLUSTER_SETTINGS,
ExtensionRequestProto.RequestType.REQUEST_EXTENSION_CLUSTER_SETTINGS,
ExtensionsManager.REQUEST_EXTENSION_CLUSTER_SETTINGS,
new ClusterSettingsResponseHandler()
);
Expand All @@ -640,7 +640,7 @@ public Settings sendEnvironmentSettingsRequest(TransportService transportService
transportService.sendRequest(
opensearchNode,
ExtensionsManager.REQUEST_EXTENSION_ENVIRONMENT_SETTINGS,
new ExtensionRequest(ExtensionsManager.RequestType.REQUEST_EXTENSION_ENVIRONMENT_SETTINGS),
new ExtensionRequest(ExtensionRequestProto.RequestType.REQUEST_EXTENSION_ENVIRONMENT_SETTINGS),
environmentSettingsResponseHandler
);
// Wait on environment settings response
Expand Down

0 comments on commit 84ba9ed

Please sign in to comment.