Skip to content

Drop Mina and Netty from flume-ng-core#448

Merged
rgoers merged 5 commits into
trunkfrom
drop-mina-netty-from-core
Jun 12, 2026
Merged

Drop Mina and Netty from flume-ng-core#448
rgoers merged 5 commits into
trunkfrom
drop-mina-netty-from-core

Conversation

@ppkarwasz

Copy link
Copy Markdown
Member

Summary

Removes the Apache Mina and Netty dependencies from flume-ng-core by moving the sources that pull them in into two new JPMS-friendly modules under flume-ng-sources:

  • flume-syslog-source (org.apache.flume.source.syslog): SyslogTcpSource, SyslogUDPSource, MultiportSyslogTCPSource and their shared parser/utils
  • flume-netcat-source (org.apache.flume.source.netcat): NetcatUdpSource

The classes are repackaged so each module owns a distinct package (no split packages). The short source aliases in SourceType keep working; only the target FQCNs change. flume-ng-core no longer depends on io.netty:netty-all or org.apache.mina:mina-core.

Test changes

The TLS unit tests no longer rely on checked-in keystore/PEM blobs: the X509Certificates helper moves to the flume-ng-sdk test-jar alongside a new TestKeyStores helper, and the stores are generated in memory with Bouncy Castle. The orphaned test resources are deleted.

A second commit opens the required java.base packages for the flume-ng-sdk surefire run, fixing a pre-existing AbstractSSLUtilTest failure on Java 16+ (unrelated to the Mina/Netty removal).

Also removes the dead Netty PatternRule class (no references).

Move the sources that pull in Apache Mina and Netty out of
flume-ng-core into two new modules under flume-ng-sources:

  - flume-syslog-source (org.apache.flume.source.syslog):
    SyslogTcpSource, SyslogUDPSource, MultiportSyslogTCPSource and
    their shared parser/utils
  - flume-netcat-source (org.apache.flume.source.netcat):
    NetcatUdpSource

The classes are repackaged so each module owns a distinct package,
keeping the modules JPMS-friendly (no split packages). The short
source aliases in SourceType keep working; only the target FQCNs
change. flume-ng-core no longer depends on io.netty:netty-all or
org.apache.mina:mina-core.

The TLS unit tests no longer rely on checked-in keystore/PEM blobs:
the X509Certificates helper moves to the flume-ng-sdk test-jar
alongside a new TestKeyStores helper, and the stores are generated
in memory with Bouncy Castle. The orphaned test resources are
deleted.

Also remove the dead Netty PatternRule class (no references).

Assisted-By: Claude Opus 4.8 <noreply@anthropic.com>
AbstractSSLUtilTest injects environment variables by reflecting into
java.lang.ProcessEnvironment, which fails with an
InaccessibleObjectException on Java 16+ unless the relevant java.base
packages are opened. Add the required --add-opens to the flume-ng-sdk
surefire argLine. This is a pre-existing failure, unrelated to the
Mina/Netty removal.

Assisted-By: Claude Opus 4.8 <noreply@anthropic.com>
TestDefaultSourceFactory in flume-ng-core used to verify that the
short aliases (syslogtcp, multiport_syslogtcp, syslogudp, netcatudp)
resolve to their source classes. Those classes moved out of core, so
restore the coverage in the modules that now own them, following the
TestHTTPSourceFactory pattern.

Assisted-By: Claude Opus 4.8 <noreply@anthropic.com>
The syslog and netcat sources accounted for 11 spotbugs violations
(8 + 3) in flume-ng-core. Move those allowances to the new modules
and tighten flume-ng-core to its current counts, which also absorbs
the headroom left by earlier module extractions:

  - flume-ng-core: spotbugs 199 -> 152, pmd 121 -> 64
  - flume-syslog-source: spotbugs 8
  - flume-netcat-source: spotbugs 3

The moved code has no pmd violations, so only spotbugs ceilings are
added to the new modules.

Assisted-By: Claude Opus 4.8 <noreply@anthropic.com>
@rgoers rgoers merged commit 1ff090a into trunk Jun 12, 2026
4 checks passed
@rgoers rgoers deleted the drop-mina-netty-from-core branch June 12, 2026 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants