[
https://issues.apache.org/jira/browse/FLINK-4497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15992670#comment-15992670
]
ASF GitHub Bot commented on FLINK-4497:
---------------------------------------
Github user StephanEwen commented on a diff in the pull request:
https://github.com/apache/flink/pull/2633#discussion_r114286727
--- Diff:
flink-streaming-connectors/flink-connector-cassandra/src/test/java/org/apache/flink/streaming/connectors/cassandra/CassandraConnectorITCase.java
---
@@ -389,4 +403,54 @@ private TestCassandraTupleWriteAheadSink(String
tableName, TypeSerializer<IN> se
this.tableName = tableName;
}
}
+
+ @Test
+ public void testCassandraScalaTupleAtLeastOnceSinkBuilderDetection()
throws Exception {
+ Class<Tuple1<String>> c = (Class<Tuple1<String>>) new
Tuple1<>("hello").getClass();
+ Seq<TypeInformation<?>> typeInfos =
JavaConverters.asScalaBufferConverter(
+ Arrays.<TypeInformation<?>>asList(new
TypeInformation[]{BasicTypeInfo.STRING_TYPE_INFO})).asScala();
+ Seq<String> fieldNames = JavaConverters.asScalaBufferConverter(
+ Arrays.asList(new String[]{"_1"})).asScala();
+
+ CaseClassTypeInfo<Tuple1<String>> typeInfo = new
CaseClassTypeInfo<Tuple1<String>>(c, null, typeInfos, fieldNames) {
+ @Override
+ public TypeSerializer<Tuple1<String>>
createSerializer(ExecutionConfig config) {
+ return null;
+ }
+ };
+
+ StreamExecutionEnvironment env =
mock(StreamExecutionEnvironment.class);
--- End diff --
I think there is no need to mock this. You can use a regular execution
environment.
Unless you call `execute()`, no mini cluster would be spawned anyways.
> Add support for Scala tuples and case classes to Cassandra sink
> ---------------------------------------------------------------
>
> Key: FLINK-4497
> URL: https://issues.apache.org/jira/browse/FLINK-4497
> Project: Flink
> Issue Type: Improvement
> Components: Cassandra Connector
> Affects Versions: 1.1.0
> Reporter: Elias Levy
> Assignee: Chesnay Schepler
>
> The new Cassandra sink only supports streams of Flink Java tuples and Java
> POJOs that have been annotated for use by Datastax Mapper. The sink should
> be extended to support Scala types and case classes.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)