Drop Mina and Netty from flume-ng-core#448
Merged
Merged
Conversation
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
approved these changes
Jun 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes the Apache Mina and Netty dependencies from
flume-ng-coreby moving the sources that pull them in into two new JPMS-friendly modules underflume-ng-sources:org.apache.flume.source.syslog):SyslogTcpSource,SyslogUDPSource,MultiportSyslogTCPSourceand their shared parser/utilsorg.apache.flume.source.netcat):NetcatUdpSourceThe classes are repackaged so each module owns a distinct package (no split packages). The short source aliases in
SourceTypekeep working; only the target FQCNs change.flume-ng-coreno longer depends onio.netty:netty-allororg.apache.mina:mina-core.Test changes
The TLS unit tests no longer rely on checked-in keystore/PEM blobs: the
X509Certificateshelper moves to theflume-ng-sdktest-jar alongside a newTestKeyStoreshelper, and the stores are generated in memory with Bouncy Castle. The orphaned test resources are deleted.A second commit opens the required
java.basepackages for theflume-ng-sdksurefire run, fixing a pre-existingAbstractSSLUtilTestfailure on Java 16+ (unrelated to the Mina/Netty removal).Also removes the dead Netty
PatternRuleclass (no references).