flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-6225) Support Row Stream for CassandraSink
Date Fri, 06 Oct 2017 02:26:00 GMT

    [ https://issues.apache.org/jira/browse/FLINK-6225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16194056#comment-16194056
] 

ASF GitHub Bot commented on FLINK-6225:
---------------------------------------

Github user PangZhi commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3748#discussion_r143098834
  
    --- Diff: flink-connectors/flink-connector-cassandra/src/test/java/org/apache/flink/streaming/connectors/cassandra/CassandraConnectorITCase.java
---
    @@ -392,6 +425,45 @@ public void testCassandraPojoAtLeastOnceSink() throws Exception {
     	}
     
     	@Test
    +	public void testCassandraTableSink() throws Exception {
    +		StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
    +		env.setParallelism(1);
    +
    +		DataStreamSource<Row> source = env.fromCollection(rowCollection);
    +		CassandraTableSink cassandraTableSink = new CassandraTableSink(new ClusterBuilder()
{
    +			@Override
    +			protected Cluster buildCluster(Cluster.Builder builder) {
    +				return builder.addContactPointsWithPorts(new InetSocketAddress(HOST, PORT)).build();
    +			}
    +		}, injectTableName(INSERT_DATA_QUERY), new Properties());
    +		CassandraTableSink newCassandrTableSink = cassandraTableSink.configure(FIELD_NAMES,
FIELD_TYPES);
    +
    +		newCassandrTableSink.emitDataStream(source);
    +
    +		env.execute();
    +		ResultSet rs = session.execute(injectTableName(SELECT_DATA_QUERY));
    +		Assert.assertEquals(20, rs.all().size());
    +	}
    +
    +	@Test
    +	public void testCassandraTableSinkE2E() throws Exception {
    --- End diff --
    
    this is added as another reviewer think better to add e2e test using sql api.


> 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)

Mime
View raw message