From 45c4b811ffc8dc6133dd2dc0a36022d721b5e4a7 Mon Sep 17 00:00:00 2001 From: Tianli Feng Date: Thu, 9 Jun 2022 19:22:25 -0700 Subject: [PATCH] Deprecate classes in org.opensearch.action.support.master Signed-off-by: Tianli Feng --- .../support/master/AcknowledgedRequest.java | 54 +++++++++++ .../master/AcknowledgedRequestBuilder.java | 52 +++++++++++ .../support/master/AcknowledgedResponse.java | 56 ++++++++++++ .../MasterNodeOperationRequestBuilder.java | 56 ++++++++++++ ...MasterNodeReadOperationRequestBuilder.java | 58 ++++++++++++ .../support/master/MasterNodeReadRequest.java | 53 +++++++++++ .../support/master/MasterNodeRequest.java | 52 +++++++++++ .../master/ShardsAcknowledgedResponse.java | 50 +++++++++++ .../master/TransportMasterNodeAction.java | 89 ++++++++++++++++++ .../master/TransportMasterNodeReadAction.java | 90 +++++++++++++++++++ .../master/info/ClusterInfoRequest.java | 53 +++++++++++ .../info/ClusterInfoRequestBuilder.java | 53 +++++++++++ .../info/TransportClusterInfoAction.java | 62 +++++++++++++ .../support/master/info/package-info.java | 10 +++ .../action/support/master/package-info.java | 11 +++ 15 files changed, 799 insertions(+) create mode 100644 server/src/main/java/org/opensearch/action/support/master/AcknowledgedRequest.java create mode 100644 server/src/main/java/org/opensearch/action/support/master/AcknowledgedRequestBuilder.java create mode 100644 server/src/main/java/org/opensearch/action/support/master/AcknowledgedResponse.java create mode 100644 server/src/main/java/org/opensearch/action/support/master/MasterNodeOperationRequestBuilder.java create mode 100644 server/src/main/java/org/opensearch/action/support/master/MasterNodeReadOperationRequestBuilder.java create mode 100644 server/src/main/java/org/opensearch/action/support/master/MasterNodeReadRequest.java create mode 100644 server/src/main/java/org/opensearch/action/support/master/MasterNodeRequest.java create mode 100644 server/src/main/java/org/opensearch/action/support/master/ShardsAcknowledgedResponse.java create mode 100644 server/src/main/java/org/opensearch/action/support/master/TransportMasterNodeAction.java create mode 100644 server/src/main/java/org/opensearch/action/support/master/TransportMasterNodeReadAction.java create mode 100644 server/src/main/java/org/opensearch/action/support/master/info/ClusterInfoRequest.java create mode 100644 server/src/main/java/org/opensearch/action/support/master/info/ClusterInfoRequestBuilder.java create mode 100644 server/src/main/java/org/opensearch/action/support/master/info/TransportClusterInfoAction.java create mode 100644 server/src/main/java/org/opensearch/action/support/master/info/package-info.java create mode 100644 server/src/main/java/org/opensearch/action/support/master/package-info.java diff --git a/server/src/main/java/org/opensearch/action/support/master/AcknowledgedRequest.java b/server/src/main/java/org/opensearch/action/support/master/AcknowledgedRequest.java new file mode 100644 index 0000000000000..97f4ad4b59043 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/support/master/AcknowledgedRequest.java @@ -0,0 +1,54 @@ +/* + * 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. + */ + +/* + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +package org.opensearch.action.support.master; + +import org.opensearch.action.support.clustermanager.ClusterManagerNodeRequest; +import org.opensearch.common.io.stream.StreamInput; + +import java.io.IOException; + +/** + * Abstract class that allows to mark action requests that support acknowledgements. + * Facilitates consistency across different api. + * + * @opensearch.internal + */ +public abstract class AcknowledgedRequest> extends + org.opensearch.action.support.clustermanager.AcknowledgedRequest { + protected AcknowledgedRequest() { + super(); + } + + protected AcknowledgedRequest(StreamInput in) throws IOException { + super(in); + } +} diff --git a/server/src/main/java/org/opensearch/action/support/master/AcknowledgedRequestBuilder.java b/server/src/main/java/org/opensearch/action/support/master/AcknowledgedRequestBuilder.java new file mode 100644 index 0000000000000..7cec5be1407df --- /dev/null +++ b/server/src/main/java/org/opensearch/action/support/master/AcknowledgedRequestBuilder.java @@ -0,0 +1,52 @@ +/* + * 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. + */ + +/* + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +package org.opensearch.action.support.master; + +import org.opensearch.action.ActionType; +import org.opensearch.action.support.clustermanager.AcknowledgedRequest; +import org.opensearch.action.support.clustermanager.AcknowledgedResponse; +import org.opensearch.client.OpenSearchClient; + +/** + * Base request builder for cluster-manager node operations that support acknowledgements + * + * @opensearch.internal + */ +public abstract class AcknowledgedRequestBuilder< + Request extends AcknowledgedRequest, + Response extends AcknowledgedResponse, + RequestBuilder extends AcknowledgedRequestBuilder> extends + org.opensearch.action.support.clustermanager.AcknowledgedRequestBuilder { + protected AcknowledgedRequestBuilder(OpenSearchClient client, ActionType action, Request request) { + super(client, action, request); + } +} diff --git a/server/src/main/java/org/opensearch/action/support/master/AcknowledgedResponse.java b/server/src/main/java/org/opensearch/action/support/master/AcknowledgedResponse.java new file mode 100644 index 0000000000000..86ae1c313a8e6 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/support/master/AcknowledgedResponse.java @@ -0,0 +1,56 @@ +/* + * 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. + */ + +/* + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +package org.opensearch.action.support.master; + +import org.opensearch.common.io.stream.StreamInput; + +import java.io.IOException; + +/** + * A response that indicates that a request has been acknowledged + * + * @opensearch.internal + */ +public class AcknowledgedResponse extends org.opensearch.action.support.clustermanager.AcknowledgedResponse { + + public AcknowledgedResponse(StreamInput in) throws IOException { + super(in); + } + + public AcknowledgedResponse(StreamInput in, boolean readAcknowledged) throws IOException { + super(in, readAcknowledged); + } + + public AcknowledgedResponse(boolean acknowledged) { + super(acknowledged); + } +} diff --git a/server/src/main/java/org/opensearch/action/support/master/MasterNodeOperationRequestBuilder.java b/server/src/main/java/org/opensearch/action/support/master/MasterNodeOperationRequestBuilder.java new file mode 100644 index 0000000000000..93ccbec993ac6 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/support/master/MasterNodeOperationRequestBuilder.java @@ -0,0 +1,56 @@ +/* + * 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. + */ + +/* + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +package org.opensearch.action.support.master; + +import org.opensearch.action.ActionType; +import org.opensearch.action.ActionResponse; +import org.opensearch.action.support.clustermanager.ClusterManagerNodeOperationRequestBuilder; +import org.opensearch.action.support.clustermanager.ClusterManagerNodeRequest; +import org.opensearch.client.OpenSearchClient; + +/** + * Base request builder for cluster-manager node operations + * + * @opensearch.internal + */ +@Deprecated +public abstract class MasterNodeOperationRequestBuilder< + Request extends ClusterManagerNodeRequest, + Response extends ActionResponse, + RequestBuilder extends MasterNodeOperationRequestBuilder> extends + ClusterManagerNodeOperationRequestBuilder { + + protected MasterNodeOperationRequestBuilder(OpenSearchClient client, ActionType action, Request request) { + super(client, action, request); + } +} diff --git a/server/src/main/java/org/opensearch/action/support/master/MasterNodeReadOperationRequestBuilder.java b/server/src/main/java/org/opensearch/action/support/master/MasterNodeReadOperationRequestBuilder.java new file mode 100644 index 0000000000000..2ac6b2ba05b4c --- /dev/null +++ b/server/src/main/java/org/opensearch/action/support/master/MasterNodeReadOperationRequestBuilder.java @@ -0,0 +1,58 @@ +/* + * 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. + */ + +/* + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +package org.opensearch.action.support.master; + +import org.opensearch.action.ActionType; +import org.opensearch.action.ActionResponse; +import org.opensearch.action.support.clustermanager.ClusterManagerNodeOperationRequestBuilder; +import org.opensearch.action.support.clustermanager.ClusterManagerNodeReadOperationRequestBuilder; +import org.opensearch.action.support.clustermanager.ClusterManagerNodeReadRequest; +import org.opensearch.client.OpenSearchClient; + +/** + * Base request builder for cluster-manager node read operations that can be executed on the local node as well + * + * @opensearch.internal + * @deprecated As of 2.1, because supporting inclusive language, replaced by {@link ClusterManagerNodeReadOperationRequestBuilder} + */ +@Deprecated +public abstract class MasterNodeReadOperationRequestBuilder< + Request extends ClusterManagerNodeReadRequest, + Response extends ActionResponse, + RequestBuilder extends ClusterManagerNodeReadOperationRequestBuilder> extends + ClusterManagerNodeOperationRequestBuilder { + + protected MasterNodeReadOperationRequestBuilder(OpenSearchClient client, ActionType action, Request request) { + super(client, action, request); + } +} diff --git a/server/src/main/java/org/opensearch/action/support/master/MasterNodeReadRequest.java b/server/src/main/java/org/opensearch/action/support/master/MasterNodeReadRequest.java new file mode 100644 index 0000000000000..d8c407722ed8d --- /dev/null +++ b/server/src/main/java/org/opensearch/action/support/master/MasterNodeReadRequest.java @@ -0,0 +1,53 @@ +/* + * 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. + */ + +/* + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +package org.opensearch.action.support.master; + +import org.opensearch.action.support.clustermanager.ClusterManagerNodeReadRequest; +import org.opensearch.common.io.stream.StreamInput; + +import java.io.IOException; + +/** + * Base request for cluster-manager based read operations that allows to read the cluster state from the local node if needed + * + * @opensearch.internal + * @deprecated As of 2.1, because supporting inclusive language, replaced by {@link ClusterManagerNodeReadRequest} + */ +@Deprecated +public abstract class MasterNodeReadRequest> extends ClusterManagerNodeReadRequest { + protected MasterNodeReadRequest() {} + + protected MasterNodeReadRequest(StreamInput in) throws IOException { + super(in); + } +} diff --git a/server/src/main/java/org/opensearch/action/support/master/MasterNodeRequest.java b/server/src/main/java/org/opensearch/action/support/master/MasterNodeRequest.java new file mode 100644 index 0000000000000..ca72e29913326 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/support/master/MasterNodeRequest.java @@ -0,0 +1,52 @@ +/* + * 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. + */ + +/* + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +package org.opensearch.action.support.master; + +import org.opensearch.action.support.clustermanager.ClusterManagerNodeRequest; +import org.opensearch.common.io.stream.StreamInput; + +import java.io.IOException; + +/** + * A based request for cluster-manager based operation. + * + * @opensearch.internal + * @deprecated As of 2.1, because supporting inclusive language, replaced by {@link ClusterManagerNodeRequest} + */ +@Deprecated +public abstract class MasterNodeRequest> extends ClusterManagerNodeRequest { + + protected MasterNodeRequest(StreamInput in) throws IOException { + super(in); + } +} diff --git a/server/src/main/java/org/opensearch/action/support/master/ShardsAcknowledgedResponse.java b/server/src/main/java/org/opensearch/action/support/master/ShardsAcknowledgedResponse.java new file mode 100644 index 0000000000000..ac22c0d4eb542 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/support/master/ShardsAcknowledgedResponse.java @@ -0,0 +1,50 @@ +/* + * 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. + */ + +/* + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +package org.opensearch.action.support.master; + +import org.opensearch.common.io.stream.StreamInput; + +import java.io.IOException; + +/** + * Transport response for shard acknowledgements + * + * @opensearch.internal + */ +public abstract class ShardsAcknowledgedResponse extends org.opensearch.action.support.clustermanager.ShardsAcknowledgedResponse { + + protected ShardsAcknowledgedResponse(StreamInput in, boolean readShardsAcknowledged) throws IOException { + super(in, readShardsAcknowledged); + } + +} diff --git a/server/src/main/java/org/opensearch/action/support/master/TransportMasterNodeAction.java b/server/src/main/java/org/opensearch/action/support/master/TransportMasterNodeAction.java new file mode 100644 index 0000000000000..5805baad0946b --- /dev/null +++ b/server/src/main/java/org/opensearch/action/support/master/TransportMasterNodeAction.java @@ -0,0 +1,89 @@ +/* + * 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. + */ + +/* + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +package org.opensearch.action.support.master; + +import org.opensearch.action.ActionResponse; +import org.opensearch.action.support.ActionFilters; +import org.opensearch.action.support.clustermanager.ClusterManagerNodeRequest; +import org.opensearch.action.support.clustermanager.TransportClusterManagerNodeAction; +import org.opensearch.cluster.metadata.IndexNameExpressionResolver; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.io.stream.Writeable; +import org.opensearch.threadpool.ThreadPool; +import org.opensearch.transport.TransportService; + +/** + * A base class for operations that needs to be performed on the cluster-manager node. + * + * @opensearch.internal + * @deprecated As of 2.1, because supporting inclusive language, replaced by {@link ClusterManagerNodeRequest} + */ +@Deprecated +public abstract class TransportMasterNodeAction, Response extends ActionResponse> extends + TransportClusterManagerNodeAction { + + protected TransportMasterNodeAction( + String actionName, + TransportService transportService, + ClusterService clusterService, + ThreadPool threadPool, + ActionFilters actionFilters, + Writeable.Reader request, + IndexNameExpressionResolver indexNameExpressionResolver + ) { + super(actionName, true, transportService, clusterService, threadPool, actionFilters, request, indexNameExpressionResolver); + } + + protected TransportMasterNodeAction( + String actionName, + boolean canTripCircuitBreaker, + TransportService transportService, + ClusterService clusterService, + ThreadPool threadPool, + ActionFilters actionFilters, + Writeable.Reader request, + IndexNameExpressionResolver indexNameExpressionResolver + ) { + super( + actionName, + canTripCircuitBreaker, + transportService, + clusterService, + threadPool, + actionFilters, + request, + indexNameExpressionResolver + ); + } + +} diff --git a/server/src/main/java/org/opensearch/action/support/master/TransportMasterNodeReadAction.java b/server/src/main/java/org/opensearch/action/support/master/TransportMasterNodeReadAction.java new file mode 100644 index 0000000000000..9b3d34ad3d931 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/support/master/TransportMasterNodeReadAction.java @@ -0,0 +1,90 @@ +/* + * 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. + */ + +/* + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +package org.opensearch.action.support.master; + +import org.opensearch.action.ActionResponse; +import org.opensearch.action.support.ActionFilters; +import org.opensearch.action.support.clustermanager.ClusterManagerNodeRequest; +import org.opensearch.action.support.clustermanager.TransportClusterManagerNodeReadAction; +import org.opensearch.cluster.metadata.IndexNameExpressionResolver; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.io.stream.Writeable; +import org.opensearch.threadpool.ThreadPool; +import org.opensearch.transport.TransportService; + +/** + * A base class for read operations that needs to be performed on the cluster-manager node. + * Can also be executed on the local node if needed. + * + * @opensearch.internal + * @deprecated As of 2.1, because supporting inclusive language, replaced by {@link ClusterManagerNodeRequest} + */ +@Deprecated +public abstract class TransportMasterNodeReadAction, Response extends ActionResponse> extends + TransportClusterManagerNodeReadAction { + + protected TransportMasterNodeReadAction( + String actionName, + TransportService transportService, + ClusterService clusterService, + ThreadPool threadPool, + ActionFilters actionFilters, + Writeable.Reader request, + IndexNameExpressionResolver indexNameExpressionResolver + ) { + super(actionName, true, transportService, clusterService, threadPool, actionFilters, request, indexNameExpressionResolver); + } + + protected TransportMasterNodeReadAction( + String actionName, + boolean checkSizeLimit, + TransportService transportService, + ClusterService clusterService, + ThreadPool threadPool, + ActionFilters actionFilters, + Writeable.Reader request, + IndexNameExpressionResolver indexNameExpressionResolver + ) { + super( + actionName, + checkSizeLimit, + transportService, + clusterService, + threadPool, + actionFilters, + request, + indexNameExpressionResolver + ); + } + +} diff --git a/server/src/main/java/org/opensearch/action/support/master/info/ClusterInfoRequest.java b/server/src/main/java/org/opensearch/action/support/master/info/ClusterInfoRequest.java new file mode 100644 index 0000000000000..1f59fca1b4081 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/support/master/info/ClusterInfoRequest.java @@ -0,0 +1,53 @@ +/* + * 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. + */ + +/* + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +package org.opensearch.action.support.master.info; + +import org.opensearch.common.io.stream.StreamInput; + +import java.io.IOException; + +/** + * Transport request for cluster information + * + * @opensearch.internal + */ +public abstract class ClusterInfoRequest> extends + org.opensearch.action.support.clustermanager.info.ClusterInfoRequest { + + public ClusterInfoRequest() {} + + public ClusterInfoRequest(StreamInput in) throws IOException { + super(in); + } + +} diff --git a/server/src/main/java/org/opensearch/action/support/master/info/ClusterInfoRequestBuilder.java b/server/src/main/java/org/opensearch/action/support/master/info/ClusterInfoRequestBuilder.java new file mode 100644 index 0000000000000..c13dbe296dff2 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/support/master/info/ClusterInfoRequestBuilder.java @@ -0,0 +1,53 @@ +/* + * 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. + */ + +/* + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +package org.opensearch.action.support.master.info; + +import org.opensearch.action.ActionType; +import org.opensearch.action.ActionResponse; +import org.opensearch.action.support.clustermanager.info.ClusterInfoRequest; +import org.opensearch.client.OpenSearchClient; + +/** + * Transport request builder for cluster information + * + * @opensearch.internal + */ +public abstract class ClusterInfoRequestBuilder< + Request extends ClusterInfoRequest, + Response extends ActionResponse, + Builder extends ClusterInfoRequestBuilder> extends + org.opensearch.action.support.clustermanager.info.ClusterInfoRequestBuilder { + + protected ClusterInfoRequestBuilder(OpenSearchClient client, ActionType action, Request request) { + super(client, action, request); + } +} diff --git a/server/src/main/java/org/opensearch/action/support/master/info/TransportClusterInfoAction.java b/server/src/main/java/org/opensearch/action/support/master/info/TransportClusterInfoAction.java new file mode 100644 index 0000000000000..26d31b874f2c0 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/support/master/info/TransportClusterInfoAction.java @@ -0,0 +1,62 @@ +/* + * 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. + */ + +/* + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* + * Modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +package org.opensearch.action.support.master.info; + +import org.opensearch.action.ActionResponse; +import org.opensearch.action.support.ActionFilters; +import org.opensearch.cluster.metadata.IndexNameExpressionResolver; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.io.stream.Writeable; +import org.opensearch.threadpool.ThreadPool; +import org.opensearch.transport.TransportService; + +/** + * Perform cluster information action + * + * @opensearch.internal + */ +public abstract class TransportClusterInfoAction, Response extends ActionResponse> extends + org.opensearch.action.support.clustermanager.info.TransportClusterInfoAction { + + public TransportClusterInfoAction( + String actionName, + TransportService transportService, + ClusterService clusterService, + ThreadPool threadPool, + ActionFilters actionFilters, + Writeable.Reader request, + IndexNameExpressionResolver indexNameExpressionResolver + ) { + super(actionName, transportService, clusterService, threadPool, actionFilters, request, indexNameExpressionResolver); + } + +} diff --git a/server/src/main/java/org/opensearch/action/support/master/info/package-info.java b/server/src/main/java/org/opensearch/action/support/master/info/package-info.java new file mode 100644 index 0000000000000..6ae2eb5465db5 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/support/master/info/package-info.java @@ -0,0 +1,10 @@ +/* + * 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. + */ + +/** Master Node Information transport handlers. */ +package org.opensearch.action.support.master.info; diff --git a/server/src/main/java/org/opensearch/action/support/master/package-info.java b/server/src/main/java/org/opensearch/action/support/master/package-info.java new file mode 100644 index 0000000000000..8bfee1861bc56 --- /dev/null +++ b/server/src/main/java/org/opensearch/action/support/master/package-info.java @@ -0,0 +1,11 @@ +/* + * 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. + */ + +/* Master Node transport handlers. */ +@Deprecated +package org.opensearch.action.support.master;