Class ElasticsearchSink<IN>
- java.lang.Object
-
- org.apache.flink.connector.elasticsearch.sink.ElasticsearchSink<IN>
-
- Type Parameters:
IN- type of the records converted to Elasticsearch actions
- All Implemented Interfaces:
Serializable,org.apache.flink.api.connector.sink2.Sink<IN>
@PublicEvolving public class ElasticsearchSink<IN> extends Object implements org.apache.flink.api.connector.sink2.Sink<IN>
Flink Sink to insert or update data in an Elasticsearch index. The sink supports the following delivery guarantees.DeliveryGuarantee.NONEdoes 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.DeliveryGuarantee.AT_LEAST_ONCEon 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.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.flink.api.connector.sink2.SinkWriter<IN>createWriter(org.apache.flink.api.connector.sink2.Sink.InitContext context)
-
-
-
Method Detail
-
createWriter
public org.apache.flink.api.connector.sink2.SinkWriter<IN> createWriter(org.apache.flink.api.connector.sink2.Sink.InitContext context) throws IOException
- Specified by:
createWriterin interfaceorg.apache.flink.api.connector.sink2.Sink<IN>- Throws:
IOException
-
-