flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rico Bergmann (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-2101) Scheme Inference doesn't work for Tuple5
Date Wed, 27 May 2015 15:15:17 GMT

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

Rico Bergmann commented on FLINK-2101:
--------------------------------------

Thanks for your reply. The difference between Tuple2 and Tuple5 (as well as others) is, that
in Tuple5 there is no constructor except the default no arg constructor as in Tuple2. I tried
to use the Tuple5Builder to create an instance, but this resulted in the same exception. 

> Scheme Inference doesn't work for Tuple5
> ----------------------------------------
>
>                 Key: FLINK-2101
>                 URL: https://issues.apache.org/jira/browse/FLINK-2101
>             Project: Flink
>          Issue Type: Bug
>          Components: Kafka Connector
>    Affects Versions: master
>            Reporter: Rico Bergmann
>            Assignee: Robert Metzger
>
> Calling addSink(new KafkaSink<Tuple5<String, String, String, Long, Double>>(
> 						"localhost:9092",
> 						"webtrends.ec1601",
> 						new Utils.TypeInformationSerializationSchema<Tuple5<String, String, String,
Long, Double>>(
> 								new Tuple5<String, String, String, Long, Double>(),
> 								env.getConfig())));
> gives me an Exception stating, that the generic type infos are not given.
> Exception in thread "main" org.apache.flink.api.common.functions.InvalidTypesException:
Tuple needs to be parameterized by using generics.
> 	at org.apache.flink.api.java.typeutils.TypeExtractor.createTypeInfoWithTypeHierarchy(TypeExtractor.java:396)
> 	at org.apache.flink.api.java.typeutils.TypeExtractor.privateCreateTypeInfo(TypeExtractor.java:339)
> 	at org.apache.flink.api.java.typeutils.TypeExtractor.createTypeInfo(TypeExtractor.java:318)
> 	at org.apache.flink.api.java.typeutils.ObjectArrayTypeInfo.<init>(ObjectArrayTypeInfo.java:45)
> 	at org.apache.flink.api.java.typeutils.ObjectArrayTypeInfo.getInfoFor(ObjectArrayTypeInfo.java:167)
> 	at org.apache.flink.api.java.typeutils.TypeExtractor.privateGetForClass(TypeExtractor.java:1150)
> 	at org.apache.flink.api.java.typeutils.TypeExtractor.privateGetForClass(TypeExtractor.java:1122)
> 	at org.apache.flink.api.java.typeutils.TypeExtractor.privateGetForObject(TypeExtractor.java:1476)
> 	at org.apache.flink.api.java.typeutils.TypeExtractor.getForObject(TypeExtractor.java:1446)
> 	at org.apache.flink.streaming.connectors.kafka.Utils$TypeInformationSerializationSchema.<init>(Utils.java:37)
> 	at de.otto.streamexample.WCExample.main(WCExample.java:132)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message