Skip to content

KAFKA-20297 Move OperatingSystem, Java, Exit... into internal#22093

Merged
chia7712 merged 4 commits intoapache:trunkfrom
m1a2st:KAFKA-20297-OperatingSystem
Apr 21, 2026
Merged

KAFKA-20297 Move OperatingSystem, Java, Exit... into internal#22093
chia7712 merged 4 commits intoapache:trunkfrom
m1a2st:KAFKA-20297-OperatingSystem

Conversation

@m1a2st
Copy link
Copy Markdown
Collaborator

@m1a2st m1a2st commented Apr 19, 2026

We have exposed several classes in org.apache.kafka.common.utils as
public APIs, which can be misleading since not all classes in this
package are intended for external use.

So move following class into internal module

  • OperatingSystem
  • Java
  • Exit
  • Shell
  • LoggingSignalHandler

Reviewers: cychiu cychiu8@gmail.com, Chia-Ping Tsai
chia7712@gmail.com

@github-actions github-actions Bot added triage PRs from the community streams core Kafka Broker tools connect performance mirror-maker-2 storage Pull requests that target the storage module tiered-storage Related to the Tiered Storage feature build Gradle build or GitHub Actions clients labels Apr 19, 2026
Copy link
Copy Markdown
Contributor

@cychiu8 cychiu8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. I have left a minor comment and everything else looks good.

*/
package org.apache.kafka.common.utils;

import org.apache.kafka.common.utils.internals.Java;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To keep the test suite organized, would it make sense to the tests (JavaTest, ExitTest, LoggingSingalHandlerTest, and ShellTest) into the utils/internals directory?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice point

@github-actions github-actions Bot removed the triage PRs from the community label Apr 21, 2026
Copy link
Copy Markdown
Member

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chia7712 chia7712 merged commit 0a367aa into apache:trunk Apr 21, 2026
23 checks passed
airlock-confluentinc Bot pushed a commit to confluentinc/schema-registry that referenced this pull request Apr 27, 2026
…arness

org.apache.kafka.common.utils.Java was moved into the internal package
org.apache.kafka.common.utils.internals.Java by the same upstream
KAFKA-20297 / apache/kafka#22093 / apache/kafka@0a367aa1 commit that
moved Exit. Kafka 8.4.0-39-ccs ships only the internals copy, so the
test compilation of ClusterTestHarness fails with cannot-find-symbol
on Java.

Java.isIbmJdk()/isIbmJdkSemeru() are two-line system-property checks
(see ce-kafka:clients/.../utils/Java.java). Inline the equivalent
expression so the test no longer depends on the now-internal class.

This is the second of N forward-port fixes for the same KAFKA-20297
move; the previous commits handled Exit and the SpotBugs DM_EXIT
suppression.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Gradle build or GitHub Actions clients connect core Kafka Broker mirror-maker-2 performance storage Pull requests that target the storage module streams tiered-storage Related to the Tiered Storage feature tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants