You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@heron.apache.org by GitBox <gi...@apache.org> on 2018/12/27 23:05:21 UTC

[GitHub] nwangtw opened a new pull request #3135: Refactor KVStreamlet to make it lighter and easier to convert from St…

nwangtw opened a new pull request #3135: Refactor KVStreamlet to make it lighter and easier to convert from St…
URL: https://github.com/apache/incubator-heron/pull/3135
 
 
   Originally KVStreamletImpl is a child class of StreamletImpl. More explicitly:
   class KVStreamletImpl<K, V> extends StreamletImpl<KeyValue<K, V>>
   
   The goal was to be able to add special functions in KVStreamlet.
   
   A big blocker in this structure is that it is impossible to convert a StreamletImpl<KeyValue<K, V>> object (such as the MapStreamlet returned by map() operation) to KVStreamletImpl<K, V> although they contain the same data.
   
   In this PR, KVStreamletImpl is replaced by KVStreamletShadow, which is a wrapper for StreamletImpl<KeyValue<K, V>> and converting StreamletImpl<KeyValue<K, V>> to KVStreamlet is as simple as "new KVStreamletShadow(stream)".
   
   Also, after this change, StreamletImpl is the base class of all Streamlet classes again and the class structure is cleaner.
   
   Note that StreamletImpl and KVStreamletImpl classes are wrappers already in Scala. So no change is needed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services