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-4497) Add support for Scala tuples and case classes to Cassandra sink
Date Tue, 02 May 2017 10:30:04 GMT

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

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

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

    https://github.com/apache/flink/pull/2633#discussion_r114289764
  
    --- 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'll fix this and rebase the PR later today.


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

Mime
View raw message