Hi Jeyhun,

I'd like to understand better the premise of RichFunctions and why |init(Some params)|,|close() |are said to be needed.

To me at least it feels strange that something is called a function yet doesn't follow the functional interface definition of having just one abstract method. I suppose init and close could be made default methods with empty bodies once Java 7 support is dropped to mitigate that concern. Still, I feel some resistance to consider something that requires initialisation and closing (which implies holding state) as being a function. Sounds more like the Processor/Transformer kind of thing semantically, rather than a function.

The KIP says there are multiple use-cases for this but doesn't enumerate any - I think some examples would be useful, otherwise that section sounds a little bit vague.

IMHO, it's the access to the RecordContext is where the added value lies but maybe I'm just lacking in imagination, so I'm asking all this to better understand the rationale for init() and close().

Thanks,
MichaƂ

On 20/05/17 17:05, Jeyhun Karimov wrote:
Dear community,

As we discussed in KIP-149 [DISCUSS] thread [1], I would like to initiate
KIP for rich functions (interfaces) [2].
I would like to get your comments.


[1]
http://search-hadoop.com/m/Kafka/uyzND1PMjdk2CslH12?subj=Re+DISCUSS+KIP+149+Enabling+key+access+in+ValueTransformer+ValueMapper+and+ValueJoiner
[2]
https://cwiki.apache.org/confluence/display/KAFKA/KIP-159%3A+Introducing+Rich+functions+to+Streams


Cheers,
Jeyhun

--
Signature
<http://www.openbet.com/>         Michal Borowiecki
Senior Software Engineer L4
        T:      +44 208 742 1600

        
        +44 203 249 8448

        
        
        E:      michal.borowie...@openbet.com
        W:      www.openbet.com <http://www.openbet.com/>

        
        OpenBet Ltd

        Chiswick Park Building 9

        566 Chiswick High Rd

        London

        W4 5XT

        UK

        
<https://www.openbet.com/email_promo>

This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmas...@openbet.com <mailto:postmas...@openbet.com> and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by OpenBet for employment and security purposes. To protect the environment please do not print this e-mail unless necessary. OpenBet Ltd. Registered Office: Chiswick Park Building 9, 566 Chiswick High Road, London, W4 5XT, United Kingdom. A company registered in England and Wales. Registered no. 3134634. VAT no. GB927523612

Reply via email to