You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by Jungtaek Lim <ka...@gmail.com> on 2018/09/04 22:41:20 UTC

Provide clients Header implementation without accessing internal package

Hi Kafka devs,

I just noticed that the only implementation for
org.apache.kafka.common.header.Header is RecordHeader which is exposed to
the 'internal' package, and some of end users just picked the class because
they don't want to create their own. IMHO it can give false signal for end
users on taking risk to access internal thing.

Would we be better to provide it without having to touch internal package
from end users? While I think moving RecordHeader would be tough one
(allowing duplicates works though) we could do it with various approach
like builder my folk suggested if we really want to hide the implementation
and let end users only refer Header interface.

If that's only missing spot I'm happy to take it forward. (I might request
contributor role then.) If that's by intention please also let me know that
we can discuss about it.

Thanks!
Jungtaek Lim (HeartSaVioR)

Re: Provide clients Header implementation without accessing internal package

Posted by Dongjin Lee <do...@apache.org>.
FYI: This discussion is initiated from this PR:
https://github.com/apache/spark/pull/22282#discussion_r214632570
(Supporting Kafka Headers functionality in Spark Structured Streaming)

Thanks,
Dongjin

On Wed, Sep 5, 2018 at 7:41 AM Jungtaek Lim <ka...@gmail.com> wrote:

> Hi Kafka devs,
>
> I just noticed that the only implementation for
> org.apache.kafka.common.header.Header is RecordHeader which is exposed to
> the 'internal' package, and some of end users just picked the class because
> they don't want to create their own. IMHO it can give false signal for end
> users on taking risk to access internal thing.
>
> Would we be better to provide it without having to touch internal package
> from end users? While I think moving RecordHeader would be tough one
> (allowing duplicates works though) we could do it with various approach
> like builder my folk suggested if we really want to hide the implementation
> and let end users only refer Header interface.
>
> If that's only missing spot I'm happy to take it forward. (I might request
> contributor role then.) If that's by intention please also let me know that
> we can discuss about it.
>
> Thanks!
> Jungtaek Lim (HeartSaVioR)
>


-- 
*Dongjin Lee*

*A hitchhiker in the mathematical world.*

*github:  <http://goog_969573159/>github.com/dongjinleekr
<http://github.com/dongjinleekr>linkedin: kr.linkedin.com/in/dongjinleekr
<http://kr.linkedin.com/in/dongjinleekr>slideshare:
www.slideshare.net/dongjinleekr
<http://www.slideshare.net/dongjinleekr>*