Wow, this looks pretty concise. I really like it! On Mon, Jun 29, 2015 at 3:27 PM Gyula Fóra <gyf...@apache.org> wrote:
> Hey all! > > Just to add something new to the end of the discussion list. After some > discussion with Seif, and Paris, I have added a commit that replaces the > use of the Checkpointed interface with field annotations. > > This is probably the most lightweight state declaration so far and it will > probably work very well to replace the Checkpointed interface: > > public class StatefulMapper implements MapFunction<Integer,Integer> { > > @State > int counter; > @State > Serializable state; > > Object notState > > public Integer map(Integer input)[ > counter++; > //update other state > /... > } > } > > What do you think? > You can check it out here > <https://github.com/gyfora/flink/commits/annotated_state>. > > Cheers, > Gyula >