Class Elasticsearch8AsyncSinkBuilder<InputT>
- java.lang.Object
-
- org.apache.flink.connector.base.sink.AsyncSinkBaseBuilder<InputT,Operation,Elasticsearch8AsyncSinkBuilder<InputT>>
-
- org.apache.flink.cdc.connectors.elasticsearch.v2.Elasticsearch8AsyncSinkBuilder<InputT>
-
- Type Parameters:
InputT- the type of records to be sunk into an Elasticsearch cluster
public class Elasticsearch8AsyncSinkBuilder<InputT> extends org.apache.flink.connector.base.sink.AsyncSinkBaseBuilder<InputT,Operation,Elasticsearch8AsyncSinkBuilder<InputT>>
Elasticsearch8AsyncSinkBuilder The builder to construct the Elasticsearch8SinkElasticsearch8AsyncSink.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classElasticsearch8AsyncSinkBuilder.OperationConverter<T>A wrapper that evolves the Operation, since a BulkOperationVariant is not Serializable.
-
Constructor Summary
Constructors Constructor Description Elasticsearch8AsyncSinkBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Elasticsearch8AsyncSinkBuilder<InputT>allowInsecure()Allows to bypass the certificates chain validation and connect to insecure network endpoints (for example, servers which use self-signed certificates).Elasticsearch8AsyncSink<InputT>build()Creates an ElasticsearchSink instance.static <T> Elasticsearch8AsyncSinkBuilder<T>builder()Elasticsearch8AsyncSinkBuilder<InputT>setCertificateFingerprint(String certificateFingerprint)Set the certificate fingerprint to be used to verify the HTTPS connection.Elasticsearch8AsyncSinkBuilder<InputT>setElementConverter(org.apache.flink.connector.base.sink.writer.ElementConverter<InputT,co.elastic.clients.elasticsearch.core.bulk.BulkOperationVariant> elementConverter)setElementConverter set the element converter that will be called at every stream element to be processed and buffered.Elasticsearch8AsyncSinkBuilder<InputT>setHeaders(org.apache.http.Header... headers)setHeaders set the headers to be sent with the requests made to Elasticsearch cluster..Elasticsearch8AsyncSinkBuilder<InputT>setHosts(org.apache.http.HttpHost... hosts)setHosts set the hosts where the Elasticsearch cluster is reachable.Elasticsearch8AsyncSinkBuilder<InputT>setPassword(String password)setPassword set the password to authenticate the connection with the Elasticsearch cluster.Elasticsearch8AsyncSinkBuilder<InputT>setSslContextSupplier(org.apache.flink.util.function.SerializableSupplier<SSLContext> sslContextSupplier)Sets the supplier for getting anSSLContextinstance.Elasticsearch8AsyncSinkBuilder<InputT>setSslHostnameVerifier(org.apache.flink.util.function.SerializableSupplier<HostnameVerifier> sslHostnameVerifierSupplier)Sets the supplier for getting an SSLHostnameVerifierinstance.Elasticsearch8AsyncSinkBuilder<InputT>setUsername(String username)setUsername set the username to authenticate the connection with the Elasticsearch cluster.-
Methods inherited from class org.apache.flink.connector.base.sink.AsyncSinkBaseBuilder
getMaxBatchSize, getMaxBatchSizeInBytes, getMaxBufferedRequests, getMaxInFlightRequests, getMaxRecordSizeInBytes, getMaxTimeInBufferMS, setMaxBatchSize, setMaxBatchSizeInBytes, setMaxBufferedRequests, setMaxInFlightRequests, setMaxRecordSizeInBytes, setMaxTimeInBufferMS
-
-
-
-
Method Detail
-
setHosts
public Elasticsearch8AsyncSinkBuilder<InputT> setHosts(org.apache.http.HttpHost... hosts)
setHosts set the hosts where the Elasticsearch cluster is reachable.- Parameters:
hosts- the hosts address- Returns:
Elasticsearch8AsyncSinkBuilder
-
setHeaders
public Elasticsearch8AsyncSinkBuilder<InputT> setHeaders(org.apache.http.Header... headers)
setHeaders set the headers to be sent with the requests made to Elasticsearch cluster..- Parameters:
headers- the headers- Returns:
Elasticsearch8AsyncSinkBuilder
-
allowInsecure
public Elasticsearch8AsyncSinkBuilder<InputT> allowInsecure()
Allows to bypass the certificates chain validation and connect to insecure network endpoints (for example, servers which use self-signed certificates).- Returns:
- this builder
-
setCertificateFingerprint
public Elasticsearch8AsyncSinkBuilder<InputT> setCertificateFingerprint(String certificateFingerprint)
Set the certificate fingerprint to be used to verify the HTTPS connection.- Parameters:
certificateFingerprint- the certificate fingerprint- Returns:
Elasticsearch8AsyncSinkBuilder
-
setSslContextSupplier
public Elasticsearch8AsyncSinkBuilder<InputT> setSslContextSupplier(org.apache.flink.util.function.SerializableSupplier<SSLContext> sslContextSupplier)
Sets the supplier for getting anSSLContextinstance.- Parameters:
sslContextSupplier- the serializable SSLContext supplier function- Returns:
- this builder
-
setSslHostnameVerifier
public Elasticsearch8AsyncSinkBuilder<InputT> setSslHostnameVerifier(org.apache.flink.util.function.SerializableSupplier<HostnameVerifier> sslHostnameVerifierSupplier)
Sets the supplier for getting an SSLHostnameVerifierinstance.- Parameters:
sslHostnameVerifierSupplier- the serializable hostname verifier supplier function- Returns:
- this builder
-
setUsername
public Elasticsearch8AsyncSinkBuilder<InputT> setUsername(String username)
setUsername set the username to authenticate the connection with the Elasticsearch cluster.- Parameters:
username- the auth username- Returns:
Elasticsearch8AsyncSinkBuilder
-
setPassword
public Elasticsearch8AsyncSinkBuilder<InputT> setPassword(String password)
setPassword set the password to authenticate the connection with the Elasticsearch cluster.- Parameters:
password- the auth password- Returns:
Elasticsearch8AsyncSinkBuilder
-
setElementConverter
public Elasticsearch8AsyncSinkBuilder<InputT> setElementConverter(org.apache.flink.connector.base.sink.writer.ElementConverter<InputT,co.elastic.clients.elasticsearch.core.bulk.BulkOperationVariant> elementConverter)
setElementConverter set the element converter that will be called at every stream element to be processed and buffered.- Parameters:
elementConverter- elementConverter operation- Returns:
Elasticsearch8AsyncSinkBuilder
-
builder
public static <T> Elasticsearch8AsyncSinkBuilder<T> builder()
-
build
public Elasticsearch8AsyncSink<InputT> build()
Creates an ElasticsearchSink instance.- Specified by:
buildin classorg.apache.flink.connector.base.sink.AsyncSinkBaseBuilder<InputT,Operation,Elasticsearch8AsyncSinkBuilder<InputT>>- Returns:
Elasticsearch8AsyncSink
-
-