bmeriaux commented on a change in pull request #6735: [FLINK-9126] New 
CassandraPojoInputFormat to output data as a custom annotated Cassandra Pojo
URL: https://github.com/apache/flink/pull/6735#discussion_r221731262
 
 

 ##########
 File path: 
flink-connectors/flink-connector-cassandra/src/test/java/org/apache/flink/streaming/connectors/cassandra/CassandraConnectorITCase.java
 ##########
 @@ -470,6 +477,41 @@ public void testCassandraTableSink() throws Exception {
                Assert.assertTrue("The input data was not completely written to 
Cassandra", input.isEmpty());
        }
 
+       @Test
+       public void testCassandraBatchPojoFormat() throws Exception {
+
+               session.execute(CREATE_TABLE_QUERY.replace(TABLE_NAME_VARIABLE, 
"batches"));
+
+               CassandraPojoSink<CustomCassandraAnnotatedPojo> sink = new 
CassandraPojoSink<>(CustomCassandraAnnotatedPojo.class, builder);
+               sink.open(new Configuration());
+
+               List<CustomCassandraAnnotatedPojo> 
customCassandraAnnotatedPojos = IntStream.range(0, 20)
+                       .mapToObj(x -> new 
CustomCassandraAnnotatedPojo(UUID.randomUUID().toString(), x, 0))
+                       .collect(Collectors.toList());
+
+               customCassandraAnnotatedPojos.forEach(sink::send);
+               sink.close();
+
+               InputFormat<CustomCassandraAnnotatedPojo, InputSplit> source = 
new CassandraPojoInputFormat<>(SELECT_DATA_QUERY.replace(TABLE_NAME_VARIABLE, 
"batches"), builder, CustomCassandraAnnotatedPojo.class);
 
 Review comment:
   ok, it may be a little paranoid nop ? :)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to