From 84ba9ede39e808018b02378cd638ac9055313454 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 21 Apr 2023 15:28:33 +0000 Subject: [PATCH] Companion changes for moving ExtensionRequest to Protobuf (#647) * Companion changes for moving ExtensionRequest to Protobuf Signed-off-by: Sarat Vemulapalli * Fixing companion changes Signed-off-by: Sarat Vemulapalli * Companion changes for moving ExtensionRequest to Protobuf Signed-off-by: Sarat Vemulapalli --------- Signed-off-by: Sarat Vemulapalli (cherry picked from commit d122039f8e332461789f01bc7f63f6fb7573647c) Signed-off-by: github-actions[bot] --- .../java/org/opensearch/sdk/ExtensionsRunner.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/opensearch/sdk/ExtensionsRunner.java b/src/main/java/org/opensearch/sdk/ExtensionsRunner.java index ee855892..bb029a78 100644 --- a/src/main/java/org/opensearch/sdk/ExtensionsRunner.java +++ b/src/main/java/org/opensearch/sdk/ExtensionsRunner.java @@ -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; @@ -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; @@ -544,7 +544,7 @@ public void sendRegisterCustomSettingsRequest(TransportService transportService) private void sendGenericRequestWithExceptionHandling( TransportService transportService, - RequestType requestType, + ExtensionRequestProto.RequestType requestType, String orchestratorNameString, TransportResponseHandler responseHandler ) { @@ -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 @@ -598,7 +598,7 @@ public List 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 @@ -621,7 +621,7 @@ public List 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() ); @@ -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