Hi, as I get more familiar with Flink streaming and do some coding, I hit a few points which I want do discuss about because I find them contra-intuitive. Please tell me, what you think about it or clarify what I misunderstood.
1) In class StreamInvokable has two methods .setup(...) and .open(...) -> what is the difference between both? When is each of both called exactly? It seems to be, that both are used to setup an operator. Why can't they be unified? 2) The same question about .close() and .cancel() ? 3) There is an class/interface hierarchy for user defined functions. The top level interface is 'Function' and there is an interface 'RichFunction' and abstract class 'AbstractRichFunction'. For each different type, there are user functions derived from. So far so good. However, the StreamInvokable class only takes a constructor argument Function, indicating that RichFunctions are not supported. Internally, the given function is tested to be a RichFunction (using instanceof) at certain places. This in contra-intuitive from a API point of view. From my OO understanding it would be better to replace Function by RichFunction everywhere. However, I was told that the (empty) Function interface is necessary for lambda expressions. Thus, I would suggest to extend the API with methods taking a RichFunction a parameter so it is clear that those are supported, too. 4) There is the interface Timestamp that is used to extract a time stamp for a record on order to create windows on a record attribute. I think the name "Timestamp" is miss leading, because the class does not represent a time stamp. I would rather call the interface "TimestampExtractor" or something similar. 5) Stefan started the discussion about more tests for the streaming component. I would additionally suggest to improve the Javadoc documentation. The are many classes an method with missing or very brief documentation and it is ofter hard to guess what they are used for. I would also suggest to describe the interaction of components/classes and WHY some thing are implemented in a certain way. As I have background knowledge from Stratosphere, I personally can work around it and make sense out of it (at least most times). However, for new contributers it might be very hard to make sense out of it and to get started implementing new features. Cheers, Matthias
signature.asc
Description: OpenPGP digital signature