Class CassandraRowWriteAheadSink
- java.lang.Object
-
- org.apache.flink.streaming.api.operators.AbstractStreamOperator<IN>
-
- org.apache.flink.streaming.runtime.operators.GenericWriteAheadSink<org.apache.flink.types.Row>
-
- org.apache.flink.streaming.connectors.cassandra.CassandraRowWriteAheadSink
-
- All Implemented Interfaces:
Serializable
,org.apache.flink.api.common.state.CheckpointListener
,org.apache.flink.streaming.api.operators.Input<org.apache.flink.types.Row>
,org.apache.flink.streaming.api.operators.KeyContext
,org.apache.flink.streaming.api.operators.OneInputStreamOperator<org.apache.flink.types.Row,org.apache.flink.types.Row>
,org.apache.flink.streaming.api.operators.SetupableStreamOperator<org.apache.flink.types.Row>
,org.apache.flink.streaming.api.operators.StreamOperator<org.apache.flink.types.Row>
,org.apache.flink.streaming.api.operators.StreamOperatorStateHandler.CheckpointedStreamOperator
public class CassandraRowWriteAheadSink extends org.apache.flink.streaming.runtime.operators.GenericWriteAheadSink<org.apache.flink.types.Row>
Sink that emits its input elements into a Cassandra table. This sink stores incoming records within aAbstractStateBackend
, and only commits them to Cassandra if a checkpoint is completed.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CassandraRowWriteAheadSink(String insertQuery, org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.types.Row> serializer, ClusterBuilder builder, org.apache.flink.streaming.runtime.operators.CheckpointCommitter committer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
open()
protected boolean
sendValues(Iterable<org.apache.flink.types.Row> values, long checkpointId, long timestamp)
-
Methods inherited from class org.apache.flink.streaming.runtime.operators.GenericWriteAheadSink
initializeState, notifyCheckpointComplete, processElement, snapshotState
-
Methods inherited from class org.apache.flink.streaming.api.operators.AbstractStreamOperator
finish, getChainingStrategy, getContainingTask, getCurrentKey, getExecutionConfig, getInternalTimerService, getKeyedStateBackend, getKeyedStateStore, getMetricGroup, getOperatorConfig, getOperatorID, getOperatorName, getOperatorStateBackend, getOrCreateKeyedState, getPartitionedState, getPartitionedState, getProcessingTimeService, getRuntimeContext, getTimeServiceManager, getUserCodeClassloader, initializeState, isUsingCustomRawKeyedState, notifyCheckpointAborted, prepareSnapshotPreBarrier, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processWatermark, processWatermark1, processWatermark2, processWatermarkStatus, processWatermarkStatus1, processWatermarkStatus2, registerCounterOnOutput, reportOrForwardLatencyMarker, setChainingStrategy, setCurrentKey, setKeyContextElement1, setKeyContextElement2, setProcessingTimeService, setup, snapshotState
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.api.common.state.CheckpointListener
notifyCheckpointAborted
-
Methods inherited from interface org.apache.flink.streaming.api.operators.Input
processLatencyMarker, processWatermark, processWatermarkStatus
-
Methods inherited from interface org.apache.flink.streaming.api.operators.KeyContext
getCurrentKey, setCurrentKey
-
-
-
-
Constructor Detail
-
CassandraRowWriteAheadSink
protected CassandraRowWriteAheadSink(String insertQuery, org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.types.Row> serializer, ClusterBuilder builder, org.apache.flink.streaming.runtime.operators.CheckpointCommitter committer) throws Exception
- Throws:
Exception
-
-
Method Detail
-
open
public void open() throws Exception
- Specified by:
open
in interfaceorg.apache.flink.streaming.api.operators.StreamOperator<org.apache.flink.types.Row>
- Overrides:
open
in classorg.apache.flink.streaming.runtime.operators.GenericWriteAheadSink<org.apache.flink.types.Row>
- Throws:
Exception
-
close
public void close() throws Exception
- Specified by:
close
in interfaceorg.apache.flink.streaming.api.operators.StreamOperator<org.apache.flink.types.Row>
- Overrides:
close
in classorg.apache.flink.streaming.runtime.operators.GenericWriteAheadSink<org.apache.flink.types.Row>
- Throws:
Exception
-
-