You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Timo Walther (JIRA)" <ji...@apache.org> on 2017/01/18 13:15:26 UTC
[jira] [Assigned] (FLINK-5549) TypeExtractor fails with
RuntimeException, but should use GenericTypeInfo
[ https://issues.apache.org/jira/browse/FLINK-5549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Timo Walther reassigned FLINK-5549:
-----------------------------------
Assignee: Timo Walther
> TypeExtractor fails with RuntimeException, but should use GenericTypeInfo
> -------------------------------------------------------------------------
>
> Key: FLINK-5549
> URL: https://issues.apache.org/jira/browse/FLINK-5549
> Project: Flink
> Issue Type: Bug
> Components: Type Serialization System
> Affects Versions: 1.2.0
> Reporter: Robert Metzger
> Assignee: Timo Walther
>
> This issue has been reported by a user on StackOverflow: http://stackoverflow.com/questions/41700568/runtimeexception-when-using-flinks-mapfunction-with-cassandra-insert-but-not
> {code}
> Exception in thread "main" java.lang.RuntimeException: The field private java.util.List com.datastax.driver.core.querybuilder.BuiltStatement.values is already contained in the hierarchy of the class com.datastax.driver.core.querybuilder.BuiltStatement.Please use unique field names through your classes hierarchy
> at org.apache.flink.api.java.typeutils.TypeExtractor.getAllDeclaredFields(TypeExtractor.java:1762)
> at org.apache.flink.api.java.typeutils.TypeExtractor.analyzePojo(TypeExtractor.java:1683)
> at org.apache.flink.api.java.typeutils.TypeExtractor.privateGetForClass(TypeExtractor.java:1580)
> at org.apache.flink.api.java.typeutils.TypeExtractor.privateGetForClass(TypeExtractor.java:1479)
> at org.apache.flink.api.java.typeutils.TypeExtractor.createTypeInfoWithTypeHierarchy(TypeExtractor.java:737)
> at org.apache.flink.api.java.typeutils.TypeExtractor.privateCreateTypeInfo(TypeExtractor.java:565)
> at org.apache.flink.api.java.typeutils.TypeExtractor.getUnaryOperatorReturnType(TypeExtractor.java:366)
> at org.apache.flink.api.java.typeutils.TypeExtractor.getUnaryOperatorReturnType(TypeExtractor.java:305)
> at org.apache.flink.api.java.typeutils.TypeExtractor.getMapReturnTypes(TypeExtractor.java:120)
> at org.apache.flink.streaming.api.datastream.DataStream.map(DataStream.java:506)
> at se.hiq.bjornper.testenv.cassandra.SOCassandraQueryTest.main(SOCassandraQueryTest.java:51)
> {code}
> When Flink is trying to analyze the POJO, the {{getAllDeclaredFields}} method fails with a RuntimeException. When the user is using a different class that contains the POJO, it just uses the GenericTypeInfo which is able to serialize the type.
> I think we need to throw a InvalidTypesException in the {{getAllDeclaredFields}} method to fix the issue
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)