Class BigtableMutateRowsSink<T>
java.lang.Object
io.github.flink.gcp.connector.bigtable.sink.BigtableMutateRowsSink<T>
- Type Parameters:
T- type of the records written by the sink
- All Implemented Interfaces:
CrossVersionSink<T>,Serializable,org.apache.flink.api.connector.sink2.Sink<T>
At-least-once sink applying one row mutation per record through the
MutateRows bulk
batcher of google-cloud-bigtable.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBigtableMutateRowsSink(BigtableSinkConfig<T> config) Creates the sink; called byBigtableSinkBuilder. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.flink.api.connector.sink2.SinkWriter<T>createWriter(MutationBatcherFactory factory, TableAdmin tableAdmin, org.apache.flink.api.common.operators.MailboxExecutor mailboxExecutor, org.apache.flink.metrics.groups.SinkWriterMetricGroup metricGroup) Creates the writer against an injected batcher factory and table admin.org.apache.flink.api.connector.sink2.SinkWriter<T>createWriter(org.apache.flink.api.connector.sink2.WriterInitContext context) Returns the sink configuration.
-
Constructor Details
-
BigtableMutateRowsSink
Creates the sink; called byBigtableSinkBuilder.- Parameters:
config- the sink configuration
-
-
Method Details
-
getConfig
Returns the sink configuration. -
createWriter
public org.apache.flink.api.connector.sink2.SinkWriter<T> createWriter(org.apache.flink.api.connector.sink2.WriterInitContext context) throws IOException - Specified by:
createWriterin interfaceorg.apache.flink.api.connector.sink2.Sink<T>- Throws:
IOException
-
createWriter
@VisibleForTesting public org.apache.flink.api.connector.sink2.SinkWriter<T> createWriter(MutationBatcherFactory factory, TableAdmin tableAdmin, org.apache.flink.api.common.operators.MailboxExecutor mailboxExecutor, org.apache.flink.metrics.groups.SinkWriterMetricGroup metricGroup) Creates the writer against an injected batcher factory and table admin. Deliberately does not open the failure handler — that belongs to the production path above, so writer tests injecting fakes need noWriterInitContext.
-