Package org.apache.flink.connector.base.sink.writer
-
Interface Summary Interface Description BatchCreator<RequestEntryT extends Serializable> A pluggable interface for forming batches of request entries from a buffer.ElementConverter<InputT,RequestEntryT> This interface specifies the mapping between elements of a stream to request entries that can be sent to the destination.RequestBuffer<RequestEntryT extends Serializable> A flexible wrapper interface for managing buffered request entries in an async sink.ResultHandler<T> Interface to handle the result of aAsyncSinkWriterrequest. -
Class Summary Class Description AsyncSinkFatalExceptionClassifiers Common retry exception classifiers needed for common errors.AsyncSinkWriter<InputT,RequestEntryT extends Serializable> A generic sink writer that handles the general behaviour of a sink such as batching and flushing, and allows extenders to implement the logic for persisting individual request elements, with allowance for retries.AsyncSinkWriterStateSerializer<RequestEntryT extends Serializable> Serializer class forAsyncSinkWriterstate.Batch<RequestEntryT extends Serializable> A container for the result of creating a batch of request entries, including: The actual list of entries forming the batch The total size in bytes of those entries The total number of entries in the batchBufferedRequestState<RequestEntryT extends Serializable> Class holding state ofAsyncSinkWriterneeded at taking a snapshot.DequeRequestBuffer<RequestEntryT extends Serializable> Default wrapper implementation that uses anArrayDequeas the underlying data structure.RequestEntryWrapper<RequestEntryT> A wrapper that contains aRequestEntryTready to be written by the Sink Writer class, along with the size of that entry as defined by the methodgetSizeInBytes(RequestEntryT)of theAsyncSinkWriter.SimpleBatchCreator<RequestEntryT extends Serializable> A simple implementation ofBatchCreatorthat forms a batch by taking up torequestInfo.getBatchSize()entries from the head of the buffer, so long as the cumulative size in bytes does not exceed the configured maximum.