Re: Custom Class for state checkpointing

2015-08-31 Thread Robert Metzger
We've finally merged the fix for the bug you've reported here ( https://issues.apache.org/jira/browse/FLINK-2543). You should now be able to use the file-based state handle with user classes as well. Please let us know if you encounter more issues. On Wed, Aug 19, 2015 at 10:20 AM, Rico Bergmann

Re: Custom Class for state checkpointing

2015-08-18 Thread Rico Bergmann
Hi Marton. I think this is more a class loader issue. My custom class implements Serializable and so do all contained members classes. Greets. Rico. Am 18.08.2015 um 11:45 schrieb Márton Balassi balassi.mar...@gmail.com: Hey Rico, Currently the Checkpointed interface has the

Re: Custom Class for state checkpointing

2015-08-18 Thread Márton Balassi
Hey Rico, Currently the Checkpointed interface has the limitation the return type of the snapshotstate method (the generic paramter of Checkpointed) has to be java Serializable. I suspect that is the problem here. This is a limitation that we plan to lift soon. Marton On Tue, Aug 18, 2015 at

Custom Class for state checkpointing

2015-08-18 Thread Rico Bergmann
Hi! Is it possible to use your own class? I'm using the file state handler at the Jobmanager and implemented the Checkpointed interface. I tried this and got an exception: Error: java.lang.RuntimeException: Failed to deserialize state handle and setup initial operator state. at

Re: Custom Class for state checkpointing

2015-08-18 Thread Robert Metzger
Hi Rico, I'm pretty sure that this is a valid bug you've found, since this case is not yet tested (afaik). We'll fix the issue asap, until then, are you able to encapsulate your state in something that is available in Flink, for example a TupleX or just serialize it yourself into a byte[] ? On

Re: Custom Class for state checkpointing

2015-08-18 Thread Stephan Ewen
Yep, that is a valid bug! State is apparently not resolved with the correct classloader. As a workaround, you can checkpoint byte arrays and serialize/deserialize the state into byte arrays yourself. You can use the apache commons SerializationUtil class, or Flinks InstantiationUtil class for

Re: Custom Class for state checkpointing

2015-08-18 Thread Robert Metzger
I created a JIRA for the issue: https://issues.apache.org/jira/browse/FLINK-2543 Once I'm done with the Kafka pull request, I'll take a look into this. On Tue, Aug 18, 2015 at 1:56 PM, Stephan Ewen se...@apache.org wrote: Yep, that is a valid bug! State is apparently not resolved with the

Re: Custom Class for state checkpointing

2015-08-18 Thread Rico Bergmann
Hi! Using TupleX is not possible since the state is very big (a Hashtable). How would I have to do serialization into a byte array? Greets. Rico. Am 18.08.2015 um 11:44 schrieb Robert Metzger rmetz...@apache.org: Hi Rico, I'm pretty sure that this is a valid bug you've found, since

Re: Custom Class for state checkpointing

2015-08-18 Thread Robert Metzger
I'm still working on writing a test case for reproducing the issue. Which Flink version are you using? If you are using 0.10-SNAPSHOT, which exact commit? On Tue, Aug 18, 2015 at 2:09 PM, Robert Metzger rmetz...@apache.org wrote: I created a JIRA for the issue: