[ https://issues.apache.org/jira/browse/FLINK-6225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16222852#comment-16222852 ]
ASF GitHub Bot commented on FLINK-6225: --------------------------------------- Github user fhueske commented on a diff in the pull request: https://github.com/apache/flink/pull/3748#discussion_r147456818 --- Diff: flink-connectors/flink-connector-cassandra/src/main/java/org/apache/flink/streaming/connectors/cassandra/CassandraSink.java --- @@ -375,6 +381,34 @@ protected void sanityCheck() { } /** + * Builder for a {@link CassandraRowSink}. + */ + public static class CassandraRowSinkBuilder extends CassandraSinkBuilder<Row> { + public CassandraRowSinkBuilder(DataStream<Row> input, TypeInformation<Row> typeInfo, TypeSerializer<Row> serializer) { + super(input, typeInfo, serializer); + } + + @Override + protected void sanityCheck() { + super.sanityCheck(); + if (query == null || query.length() == 0) { + throw new IllegalArgumentException("Query must not be null or empty."); + } + } + + @Override + protected CassandraSink<Row> createSink() throws Exception { + return new CassandraSink<>(input.addSink(new CassandraRowSink(query, builder)).name("Cassandra Sink")); + + } + + @Override + protected CassandraSink<Row> createWriteAheadSink() throws Exception { + throw new IllegalArgumentException("Exactly-once guarantees can only be provided for tuple types."); --- End diff -- I had a look at `CassandraTupleWriteAheadSink`. It would be straightforward to copy and adapt it for `Row`. > Support Row Stream for CassandraSink > ------------------------------------ > > Key: FLINK-6225 > URL: https://issues.apache.org/jira/browse/FLINK-6225 > Project: Flink > Issue Type: New Feature > Components: Cassandra Connector > Affects Versions: 1.3.0 > Reporter: Jing Fan > Assignee: Haohui Mai > Fix For: 1.4.0 > > > Currently in CassandraSink, specifying query is not supported for row-stream. > The solution should be similar to CassandraTupleSink. -- This message was sent by Atlassian JIRA (v6.4.14#64029)