StefanXiepj commented on code in PR #74:
URL: 
https://github.com/apache/flink-connector-elasticsearch/pull/74#discussion_r1378366427


##########
flink-connector-elasticsearch8/src/main/java/org/apache/flink/connector/elasticsearch/sink/Elasticsearch8Sink.java:
##########
@@ -0,0 +1,85 @@
+package org.apache.flink.connector.elasticsearch.sink;
+
+import org.apache.flink.annotation.PublicEvolving;
+import org.apache.flink.annotation.VisibleForTesting;
+import org.apache.flink.api.connector.sink2.Sink;
+import org.apache.flink.api.connector.sink2.SinkWriter;
+import org.apache.flink.connector.base.DeliveryGuarantee;
+
+import org.apache.http.HttpHost;
+
+import javax.net.ssl.SSLContext;
+
+import java.io.IOException;
+import java.util.List;
+
+import static org.apache.flink.util.Preconditions.checkArgument;
+import static org.apache.flink.util.Preconditions.checkNotNull;
+
+/**
+ * Flink Sink to insert or update data in an Elasticsearch index. The sink 
supports the following
+ * delivery guarantees.
+ *
+ * <ul>
+ *   <li>{@link DeliveryGuarantee#NONE} does not provide any guarantees: 
actions are flushed to
+ *       Elasticsearch only depending on the configurations of the bulk 
processor. In case of a
+ *       failure, it might happen that actions are lost if the bulk processor 
still has buffered
+ *       actions.
+ *   <li>{@link DeliveryGuarantee#AT_LEAST_ONCE} on a checkpoint the sink will 
wait until all
+ *       buffered actions are flushed to and acknowledged by Elasticsearch. No 
actions will be lost
+ *       but actions might be sent to Elasticsearch multiple times when Flink 
restarts. These
+ *       additional requests may cause inconsistent data in ElasticSearch 
right after the restart,
+ *       but eventually everything will be consistent again.
+ * </ul>
+ *
+ * @param <IN> type of the records converted to Elasticsearch actions
+ * @see Elasticsearch8SinkBuilderBase on how to construct a ElasticsearchSink
+ */
+@PublicEvolving
+public class Elasticsearch8Sink<IN> implements Sink<IN> {

Review Comment:
   I am also implementing the table API. I stopped pushing new code because 
another PR is also in progress and I am not sure which solution the community 
thinks is better. I have made many changes, which may not be what the community 
wants to see. I would like to discuss the repair plan in depth with you, if you 
don't mind.



-- 
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]

Reply via email to