Hi Chia,

Good question -- working through "why is this still needed after KIP-1265"
actually made me want to reshape the KIP, so let me give the reasoning and
then two things I'd like your take on.

Why it's still needed: KIP-1265 classifies audience and detects usage, but
@InterfaceAudience.Private produces no compiler warning (only
java.lang.Deprecated does), its checker only runs if the consumer adds it to
their own build, and it sets no timeline. So for classes that are already
exposed and used, KIP-1265 alone leaves third parties with no signal and no
cutoff. KIP-1320 fills that: a zero-setup @Deprecated compile-time warning
during 4.x, plus a concrete "no compatibility guarantee from 5.0.0" policy.

That reframing makes the KIP feel more like a *policy* than a single-class
change, so two questions:

1. Retitle? From "Deprecate org.apache.kafka.common.utils.Utils and
   introduce an internal replacement" to something like "Deprecation and
   removal policy for internal classes exposed in public packages", to
   reflect that it's now primarily a policy.

2. Approach? Make the KIP's core a single policy -- "@Private-but-in-a-
   public-package classes are unsupported from 5.0.0" -- that covers the
   whole surface with no per-class code, and keep only a small curated set
   (the current Utils / ByteBufferInputStream / ByteBufferOutputStream) as
   the reference @Deprecated example. (Most deprecations wouldn't even need
   an internals move -- classes with only a few internal callers can just be
   @Deprecated in place; only heavy-internal-use ones like Utils get an
   internals replacement.) Further deprecations would then be follow-up
   JIRAs under the policy rather than new KIPs.

If that direction sounds reasonable I'll write it up in full (scope
criteria, class buckets, external-usage data). WDYT?

Thanks,
Eric

On 2026/07/03 21:27:47 Chia-Ping Tsai wrote:
> hi Eric
> 
> Would you mind including KIP-1265 in this KIP? It would be cool to elaborate 
> on why we still need this KIP even though KIP-1265 has already been merged
> 
> Best,
> Chia-Ping
> 
> On 2026/04/15 23:53:50 Eric Chang wrote:
> > Hi Kafka devs,
> > 
> > I would like to start the discussion for KIP-1320:
> > 
> > https://cwiki.apache.org/confluence/display/KAFKA/KIP-1320%3A+Deprecate+org.apache.kafka.common.utils.Utils+and+introduce+an+internal+replacement
> > 
> > This KIP proposes to deprecate `org.apache.kafka.common.utils.Utils`
> > in Kafka `4.4.0`, introduce
> > `org.apache.kafka.common.utils.internals.Utils` for Kafka internal
> > usage, and remove the old `org.apache.kafka.common.utils.Utils` class
> > in Kafka `5.0.0`.
> > 
> > The proposed migration keeps `org.apache.kafka.common.utils.Utils`
> > source and binary compatible during the Kafka `4.4.x` line. The
> > internal replacement is created by copying the existing
> > implementation, so this KIP does not propose changing the behavior of
> > any `Utils` method.
> > 
> > Please take a look and let me know your thoughts.
> > 
> > Thanks,
> > Eric Chang
> > 
> 

Reply via email to