flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gyula Fora (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-3006) TypeExtractor fails on custom type
Date Wed, 18 Nov 2015 18:42:11 GMT

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

Gyula Fora commented on FLINK-3006:
-----------------------------------

This only occurs when the udf is a java 8 lambda method. Could you please try that?

> TypeExtractor fails on custom type
> ----------------------------------
>
>                 Key: FLINK-3006
>                 URL: https://issues.apache.org/jira/browse/FLINK-3006
>             Project: Flink
>          Issue Type: Bug
>          Components: Type Serialization System
>    Affects Versions: 0.10.0, 1.0.0
>            Reporter: Gyula Fora
>
> I get a weird error when I try to execute my job on the cluster. Locally this works fine
but running it from the command line fails during typeextraction:
> input1.union(input2, input3).map(Either::<UserEvent, Long> Left).returns(eventOrLongType);
> The UserEvent type is a subclass of Tuple4<Long, Long, String, Boolean> with no
extra fields. And the Either type is a regular pojo with 2 public nullable fields and a a
default constructor.
> This fails when trying to extract the output type from the mapper, but I wouldnt actually
care about that because I am providing my custom type implementation for this Either type.
> The error:
> org.apache.flink.client.program.ProgramInvocationException: The main method caused an
error.
> 	at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:512)
> 	at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:395)
> 	at org.apache.flink.client.program.Client.runBlocking(Client.java:250)
> 	at org.apache.flink.client.CliFrontend.executeProgramBlocking(CliFrontend.java:669)
> 	at org.apache.flink.client.CliFrontend.run(CliFrontend.java:320)
> 	at org.apache.flink.client.CliFrontend.parseParameters(CliFrontend.java:971)
> 	at org.apache.flink.client.CliFrontend.main(CliFrontend.java:1021)
> Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
> 	at java.util.ArrayList.elementData(ArrayList.java:418)
> 	at java.util.ArrayList.get(ArrayList.java:431)
> 	at org.apache.flink.api.java.typeutils.TypeExtractor.createTypeInfoFromInputs(TypeExtractor.java:599)
> 	at org.apache.flink.api.java.typeutils.TypeExtractor.createTypeInfoWithTypeHierarchy(TypeExtractor.java:493)
> 	at org.apache.flink.api.java.typeutils.TypeExtractor.analyzePojo(TypeExtractor.java:1392)
> 	at org.apache.flink.api.java.typeutils.TypeExtractor.privateGetForClass(TypeExtractor.java:1273)
> 	at org.apache.flink.api.java.typeutils.TypeExtractor.createTypeInfoWithTypeHierarchy(TypeExtractor.java:560)
> 	at org.apache.flink.api.java.typeutils.TypeExtractor.privateCreateTypeInfo(TypeExtractor.java:389)
> 	at org.apache.flink.api.java.typeutils.TypeExtractor.getUnaryOperatorReturnType(TypeExtractor.java:273)
> 	at org.apache.flink.api.java.typeutils.TypeExtractor.getMapReturnTypes(TypeExtractor.java:110)
> 	at org.apache.flink.streaming.api.datastream.DataStream.map(DataStream.java:550)



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

Mime
View raw message