uliandim commented on code in PR #56: URL: https://github.com/apache/flink-connector-opensearch/pull/56#discussion_r2720089083
########## flink-connector-opensearch3/src/main/java/org/apache/flink/connector/opensearch/sink/Opensearch3RequestIndexer.java: ########## @@ -0,0 +1,73 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF 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. + */ + +package org.apache.flink.connector.opensearch.sink; + +import org.apache.flink.annotation.PublicEvolving; + +import javax.annotation.Nullable; + +import java.util.Map; + +/** + * Users add multiple delete, index or update requests to an {@link Opensearch3RequestIndexer} to + * prepare them for sending to an OpenSearch 3.x cluster. + * + * <p>This interface is specific to OpenSearch 3.x and uses the new opensearch-java client API + * patterns. + */ +@PublicEvolving +public interface Opensearch3RequestIndexer { Review Comment: The existing RequestIndexer and OpensearchEmitter interfaces are tightly coupled to the rest-high-level-client types. OpenSearch 3.x removed the rest-high-level-client entirely and replaced it with the new opensearch-java client, which has a completely different API paradigm (builder-based operations like IndexOperation.Builder, DeleteOperation.Builder, etc.). Since those classes (org.opensearch.action.*) don't exist in the new client, we can't reuse the existing interfaces without a breaking change to the base module. An alternative would be to refactor the base module to use a more abstract/generic interface, but that would break existing users of the 1.x/2.x connectors. Happy to discuss if you think that's a better approach! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
