zentol commented on code in PR #1: URL: https://github.com/apache/flink-connector-opensearch/pull/1#discussion_r1030199426
########## flink-connector-opensearch/src/main/java/org/apache/flink/connector/opensearch/sink/OpensearchSink.java: ########## @@ -88,4 +88,8 @@ public SinkWriter<IN> createWriter(InitContext context) throws IOException { context.metricGroup(), context.getMailboxExecutor()); } + + DeliveryGuarantee getDeliveryGuarantee() { Review Comment: add `@VisibleForTesting` ########## flink-connector-opensearch/src/test/java/org/apache/flink/architecture/TestCodeArchitectureTest.java: ########## @@ -0,0 +1,57 @@ +/* + * 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.architecture; + +import org.apache.flink.architecture.common.ImportOptions; + +import com.tngtech.archunit.core.importer.ImportOption; +import com.tngtech.archunit.core.importer.Location; +import com.tngtech.archunit.junit.AnalyzeClasses; +import com.tngtech.archunit.junit.ArchTest; +import com.tngtech.archunit.junit.ArchTests; + +import java.util.regex.Pattern; + +/** Architecture tests for test code. */ +@AnalyzeClasses( + packages = { + "org.apache.flink.connector.opensearch", + "org.apache.flink.streaming.connectors.opensearch" + }, + importOptions = { + ImportOption.OnlyIncludeTests.class, + TestCodeArchitectureTest.IncludeES7ImportOption.class, Review Comment: This isn't required; it's only needed when you have a `base` module like the ES connector does. ########## pom.xml: ########## @@ -0,0 +1,447 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +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. +--> +<project + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" + xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + + <parent> + <groupId>io.github.zentol.flink</groupId> + <artifactId>flink-connector-parent</artifactId> + <version>1.0</version> + </parent> + + <modelVersion>4.0.0</modelVersion> + + <groupId>org.apache.flink</groupId> + <artifactId>flink-connector-opensearch-parent</artifactId> + <version>1.0.0-SNAPSHOT</version> + <name>Flink : Connectors : Opensearch : Parent</name> + <packaging>pom</packaging> + <url>https://flink.apache.org</url> + <inceptionYear>2022</inceptionYear> + + <licenses> + <license> + <name>The Apache Software License, Version 2.0</name> + <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url> + <distribution>repo</distribution> + </license> + </licenses> + + <scm> + <url>https://github.com/apache/flink-connector-opensearch</url> + <connection>g...@github.com:apache/flink-connector-opensearch.git</connection> + <developerConnection> + scm:git:https://gitbox.apache.org/repos/asf/flink-connector-opensearch.git + </developerConnection> + </scm> + + <modules> + <module>flink-connector-opensearch</module> + <module>flink-connector-opensearch-e2e-tests</module> + <module>flink-sql-connector-opensearch</module> + </modules> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> + + <flink.version>1.16.0</flink.version> + <flink.shaded.version>15.0</flink.shaded.version> + + <jackson-bom.version>2.13.4.20221013</jackson-bom.version> + <junit4.version>4.13.2</junit4.version> Review Comment: JUnit4 should no longer be required. ########## flink-connector-opensearch/src/main/java/org/apache/flink/connector/opensearch/sink/RequestIndexer.java: ########## @@ -0,0 +1,56 @@ +/* + * 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.Internal; + +import org.opensearch.action.delete.DeleteRequest; +import org.opensearch.action.index.IndexRequest; +import org.opensearch.action.update.UpdateRequest; + +/** + * Users add multiple delete, index or update requests to a {@link RequestIndexer} to prepare them + * for sending to an Opensearch cluster. + */ +@Internal Review Comment: This shouldn't be internal since it's returned by OpensearchEmitter which is PublicEvolving. (as reported by the architecture tests ;) ) -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org