This is an automated email from the ASF dual-hosted git repository.

ppkarwasz pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/logging-flume.git


The following commit(s) were added to refs/heads/trunk by this push:
     new a887ed1a0 Drop Jetty from flume-ng-core (#446)
a887ed1a0 is described below

commit a887ed1a020bdb610105c1a972c82c023970b9fe
Author: Piotr P. Karwasz <[email protected]>
AuthorDate: Thu Jun 11 18:46:55 2026 +0200

    Drop Jetty from flume-ng-core (#446)
    
    * Move HTTPSource to its own flume-http-source module
    
    Keeping HTTPSource in flume-ng-core forced the heavy Jetty/Gson HTTP
    stack onto every core consumer. Extract it into a dedicated optional
    source module under flume-ng-sources, like taildir, so it ships only
    when needed.
    
    The package (org.apache.flume.source.http) is unchanged, so the
    SourceType.HTTP reflective mapping and existing "http" configs keep
    working. Core retains Jetty/Gson for its metrics server and
    HTTPServerConstraintUtil.
    
    Assisted-By: Claude Opus 4.8 (1M context) <[email protected]>
    
    * Make flume-http-source self-contained for HTTP constraints
    
    HTTPSource was reaching into flume-ng-core for HTTPServerConstraintUtil.
    Move that helper into the module next to its only caller and make it
    package-private, so the HTTP source no longer depends on a core internal
    for its Jetty constraint handling. Declare jetty-security directly here
    (managed in flume-parent) since the helper uses it.
    
    Assisted-By: Claude Opus 4.8 (1M context) <[email protected]>
    
    * Move monitoring services to flume-ng-instrumentation modules
    
    Split the Ganglia, HTTP and Prometheus MonitorService implementations
    out of flume-ng-core into three modules under a new flume-ng-instrumentation
    parent, each in its own package so there are no split packages.
    
    Replace the hardcoded MonitoringType enum with ServiceLoader discovery:
    MonitorService gains a getType() default method, each provider declares
    itself via META-INF/services, and the node selects one by matching
    flume.monitoring.type against getType() (FQCN fallback preserved). The
    modules are wired through the BOM and bundled by flume-ng-dist only.
    
    Core keeps the MonitorService interface and JMXPollUtil, and drops the now
    unused gson and prometheus dependencies.
    
    Assisted-By: Claude Opus 4.8 (1M context) <[email protected]>
    
    * Declare gson dependency in flume-taildir-source
    
    The taildir source uses gson for its position file but was getting it
    transitively from flume-ng-core, which no longer provides it after the
    monitoring split. Without an explicit dependency the position file
    handling fails at runtime with NoClassDefFoundError.
    
    Assisted-By: Claude Opus 4.8 (1M context) <[email protected]>
    
    * Drop Jetty from flume-ng-core
    
    With the HTTP source and the HTTP/Prometheus monitors moved to their own
    modules, nothing in flume-ng-core's main code uses Jetty anymore. Remove
    the four jetty dependencies from the module.
    
    flume-ng-node's TestHttpConfigurationSource was relying on Jetty arriving
    transitively through flume-ng-core, so declare jetty-server and
    jetty-servlet as test dependencies there.
    
    Assisted-By: Claude Opus 4.8 (1M context) <[email protected]>
---
 flume-ng-core/pom.xml | 20 --------------------
 flume-ng-node/pom.xml | 18 ++++++++++++++++++
 2 files changed, 18 insertions(+), 20 deletions(-)

diff --git a/flume-ng-core/pom.xml b/flume-ng-core/pom.xml
index f73b9627b..06a71baa1 100644
--- a/flume-ng-core/pom.xml
+++ b/flume-ng-core/pom.xml
@@ -131,26 +131,6 @@
       <artifactId>netty-all</artifactId>
     </dependency>
 
-    <dependency>
-      <groupId>org.eclipse.jetty.ee11</groupId>
-      <artifactId>jetty-ee11-servlet</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.eclipse.jetty</groupId>
-      <artifactId>jetty-util</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.eclipse.jetty</groupId>
-      <artifactId>jetty-server</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.eclipse.jetty</groupId>
-      <artifactId>jetty-jmx</artifactId>
-    </dependency>
-
     <dependency>
       <groupId>org.apache.httpcomponents</groupId>
       <artifactId>httpclient</artifactId>
diff --git a/flume-ng-node/pom.xml b/flume-ng-node/pom.xml
index 2c2a6fea2..7496f9fed 100644
--- a/flume-ng-node/pom.xml
+++ b/flume-ng-node/pom.xml
@@ -140,6 +140,24 @@
       <scope>test</scope>
     </dependency>
 
+    <dependency>
+      <groupId>org.eclipse.jetty.ee11</groupId>
+      <artifactId>jetty-ee11-servlet</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-server</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>jakarta.servlet</groupId>
+      <artifactId>jakarta.servlet-api</artifactId>
+      <scope>test</scope>
+    </dependency>
+
     <dependency>
       <groupId>com.github.stefanbirkner</groupId>
       <artifactId>system-rules</artifactId>

Reply via email to