Thanks for the reply.
I think my question may have been ambiguous.
I was confirming that there would be just one method *without* a default
implementation, and therefore that the lambda I quoted would actually work.
Thanks,
-John

On Sun, Sep 23, 2018 at 10:53 AM Chia-Ping Tsai <chia7...@apache.org> wrote:

> > This means that I could supply a serializer like this: "(topic, myData)
> ->
> > myData.toByteArrayOrWhatever()", right? (and of course similar for
> > deserializers).
>
> That code will work well if KIP-331 is merged. However, the lambda
> expressions will fail if we add default implementation to all methods of
> Serializer (ditto for Deserializer). KIP-336 had discussed such changes
> which may happen in the future. That is why KIP-331 doesn't add
> FunctionalInterface annotation to Serialize and Deserializer.
>
> Cheers,
> chia-ping
>
> On 2018/09/21 21:57:51, John Roesler <j...@confluent.io> wrote:
> > If I understand the way that this works in light of KIP-331, all the
> > methods of Serializer, for example, will have defaults except for :
> "byte[]
> > serialize(String topic, T data);"
> >
> > This means that I could supply a serializer like this: "(topic, myData)
> ->
> > myData.toByteArrayOrWhatever()", right? (and of course similar for
> > deserializers).
> >
> > This sounds right to me, so if that is right, I'm still a non-binding +1.
> >
> > Thanks,
> > -John
> >
> > On Thu, Sep 20, 2018 at 10:12 PM Chia-Ping Tsai <chia7...@apache.org>
> wrote:
> >
> > > KIP-336[1] has been merged so it is time to activate this thread
> > > (KIP-331[2]). Last discussion is about "Should we add
> FunctionalInterface
> > > annotation to Serializer and Deserializer". In discussion of KIP-336 we
> > > mentioned that we probably add the default implementation for headless
> > > method later. Hence, adding FunctionalInterface annotation is not
> suitable
> > > now.
> > >
> > > KIP-331 has removed the change of adding FunctionalInterface
> annotation.
> > > Please take a look again.
> > >
> > > [1]
> > >
> https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=87298242
> > > [2]
> > >
> https://cwiki.apache.org/confluence/display/KAFKA/KIP-331+Add+default+implementation+to+close%28%29+and+configure%28%29+for+Serializer%2C+Deserializer+and+Serde
> > >
> > > Cheers,
> > > Chia-Ping
> > >
> > >
> > > On 2018/07/20 10:56:59, Ismael Juma <ism...@juma.me.uk> wrote:
> > > > Part of the motivation for this KIP is to make these interfaces
> > > functional
> > > > interfaces. But I think that may not be desirable due to the method
> that
> > > > passes headers. So, it doesn't make sense to discuss two separate
> changes
> > > > to the same interfaces in isolation, we should figure out how we want
> > > them
> > > > to work holistically.
> > > >
> > > > Ismael
> > > >
> > > > On Fri, Jul 20, 2018 at 3:50 AM Chia-Ping Tsai <chia7...@apache.org>
> > > wrote:
> > > >
> > > > > > The KIP needs 3 binding votes to pass.
> > > > >
> > > > > Thanks for the reminder. I will reopen the ballot box until we get
> 3
> > > > > tickets.
> > > > >
> > > > > > I still think we should include the details of how things will
> look
> > > like
> > > > > > with the headers being passed to serializers/deserializers to
> ensure
> > > > > > things actually make sense as a whole.
> > > > >
> > > > > This KIP is unrelated to the both methods - serialize() and
> > > deserialize().
> > > > > We won't add the default implementation to them in this kip. Please
> > > correct
> > > > > me if I didn't catch what you said.
> > > > >
> > > > > Cheers,
> > > > > Chia-Ping
> > > > >
> > > > > On 2018/07/09 01:55:41, Ismael Juma <isma...@gmail.com> wrote:
> > > > > > The KIP needs 3 binding votes to pass. I still think we should
> > > include
> > > > > the
> > > > > > details of how things will look like with the headers being
> passed to
> > > > > > serializers/deserializers to ensure things actually make sense
> as a
> > > > > whole.
> > > > > >
> > > > > > Ismael
> > > > > >
> > > > > >
> > > > > > On Sun, 8 Jul 2018, 18:31 Chia-Ping Tsai, <chia7...@apache.org>
> > > wrote:
> > > > > >
> > > > > > > All,
> > > > > > >
> > > > > > > The 72 hours has passed. The vote result of KIP-313 is shown
> below.
> > > > > > >
> > > > > > > 1 binding vote (Matthias J. Sax)
> > > > > > > 4 non-binding votes (John Roesler, Richard Yu, vito jeng and
> > > Chia-Ping)
> > > > > > >
> > > > > > > Cheers,
> > > > > > > Chia-Ping
> > > > > > >
> > > > > > > On 2018/07/05 14:45:01, Chia-Ping Tsai <chia7...@apache.org>
> > > wrote:
> > > > > > > > hi all,
> > > > > > > >
> > > > > > > > I would like to start voting on "KIP-331 Add default
> > > implementation
> > > > > to
> > > > > > > close() and configure() for Serializer, Deserializer and Serde"
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > >
> > >
> https://cwiki.apache.org/confluence/display/KAFKA/KIP-331+Add+default+implementation+to+close%28%29+and+configure%28%29+for+Serializer%2C+Deserializer+and+Serde
> > > > > > > >
> > > > > > > > Cheers,
> > > > > > > > Chia-Ping
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Reply via email to