flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Metzger (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-1251) CollectionInputFormat is not able to handle Enums
Date Wed, 19 Nov 2014 13:04:34 GMT

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

Robert Metzger commented on FLINK-1251:
---------------------------------------

Yep. It is working now with a Serializer for Enums.

> CollectionInputFormat is not able to handle Enums
> -------------------------------------------------
>
>                 Key: FLINK-1251
>                 URL: https://issues.apache.org/jira/browse/FLINK-1251
>             Project: Flink
>          Issue Type: Bug
>            Reporter: Robert Metzger
>            Assignee: Robert Metzger
>
> It seems that the CollectionInputFormat is not able to handle POJOs containing enums
properly.
> {code}
> 	public enum Category {
> 		CAT_A, CAT_B
> 	}
> 	public static class PojoWithDateAndEnum {
> 		public String group;
> 		public Date date;
> 		public Category cat;
> 	}
> {code}
> leads to
> {code}
> java.lang.IllegalStateException: unread block data
> 	at java.io.ObjectInputStream$BlockDataInputStream.setBlockDataMode(ObjectInputStream.java:2424)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1383)
> 	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1993)
> 	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1918)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:371)
> 	at org.apache.flink.util.InstantiationUtil.deserializeObject(InstantiationUtil.java:245)
> 	at org.apache.flink.util.InstantiationUtil.readObjectFromConfig(InstantiationUtil.java:231)
> 	at org.apache.flink.runtime.operators.util.TaskConfig.getStubWrapper(TaskConfig.java:281)
> 	at org.apache.flink.runtime.jobgraph.InputFormatVertex.initializeOnMaster(InputFormatVertex.java:46)
> 	at org.apache.flink.runtime.jobmanager.JobManager.submitJob(JobManager.java:380)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:483)
> 	at org.apache.flink.runtime.ipc.RPC$Server.call(RPC.java:420)
> 	at org.apache.flink.runtime.ipc.Server$Handler.run(Server.java:947)
> org.apache.flink.runtime.client.JobExecutionException: java.lang.IllegalStateException:
unread block data
> 	at java.io.ObjectInputStream$BlockDataInputStream.setBlockDataMode(ObjectInputStream.java:2424)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1383)
> 	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1993)
> 	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1918)
> 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:371)
> 	at org.apache.flink.util.InstantiationUtil.deserializeObject(InstantiationUtil.java:245)
> 	at org.apache.flink.util.InstantiationUtil.readObjectFromConfig(InstantiationUtil.java:231)
> 	at org.apache.flink.runtime.operators.util.TaskConfig.getStubWrapper(TaskConfig.java:281)
> 	at org.apache.flink.runtime.jobgraph.InputFormatVertex.initializeOnMaster(InputFormatVertex.java:46)
> 	at org.apache.flink.runtime.jobmanager.JobManager.submitJob(JobManager.java:380)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:483)
> 	at org.apache.flink.runtime.ipc.RPC$Server.call(RPC.java:420)
> 	at org.apache.flink.runtime.ipc.Server$Handler.run(Server.java:947)
> 	at org.apache.flink.runtime.client.JobClient.submitJobAndWait(JobClient.java:256)
> 	at org.apache.flink.test.util.JavaProgramTestBase$TestEnvironment.execute(JavaProgramTestBase.java:216)
> 	at org.apache.flink.api.java.ExecutionEnvironment.execute(ExecutionEnvironment.java:578)
> 	at org.apache.flink.test.javaApiOperators.ReduceITCase$ReduceProgs.runProgram(ReduceITCase.java:364)
> 	at org.apache.flink.test.javaApiOperators.ReduceITCase.testProgram(ReduceITCase.java:66)
> 	at org.apache.flink.test.util.JavaProgramTestBase.testJob(JavaProgramTestBase.java:121)
> {code}
> I don't know if this is related: https://bugs.openjdk.java.net/browse/JDK-7132873



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

Mime
View raw message