ericyuan915 opened a new issue, #18981:
URL: https://github.com/apache/hudi/issues/18981

   ### Bug Description
   
   hudi-flink-bundle bundles org.apache.flink:flink-metrics-dropwizard and 
(since #18730) relocates com.codahale.metrics → 
org.apache.hudi.com.codahale.metrics in packaging/hudi-flink-bundle/pom.xml, 
but does not relocate org.apache.flink.dropwizard.
   
   maven-shade therefore recompiles the bundled 
org.apache.flink.dropwizard.metrics.DropwizardHistogramWrapper against the 
relocated org.apache.hudi.com.codahale.metrics.Histogram, while leaving the 
class at its original FQN. The shaded jar thus exposes a 
DropwizardHistogramWrapper whose only constructor is 
(org.apache.hudi.com.codahale.metrics.Histogram). Any app with both 
hudi-flink-bundle and the real flink-metrics-dropwizard on the classpath can 
resolve the shaded copy. Standard code then fails at runtime: 
metricGroup.histogram("latency", new DropwizardHistogramWrapper(new 
com.codahale.metrics.Histogram(new SlidingWindowReservoir(500))));
   
   **Expected**: the bundle should not place an un-relocated 
DropwizardHistogramWrapper (compiled against shaded codahale) at the real Flink 
FQN; consumers of the real flink-metrics-dropwizard should be unaffected.
   
   **Root cause**: #18730 added the codahale relocation without relocating the 
Flink dropwizard bridge. Fix: add a sibling relocation 
org.apache.flink.dropwizard → org.apache.hudi.org.apache.flink.dropwizard. PR 
to follow.
   
   ### Environment
   
   **Hudi version:** master (1.3.0-SNAPSHOT) — present since #18730 
(2026-05-15); not in 1.2.0 or earlier
   **Query engine:** Flink (e.g. hudi-flink1.18-bundle)
   **Relevant configs:** hudi-flink-bundle (all Flink versions built from 
packaging/hudi-flink-bundle/pom.xml)
   
   
   ### Logs and Stack Trace
   
   java.lang.NoSuchMethodError: 'void 
org.apache.flink.dropwizard.metrics.DropwizardHistogramWrapper.<init>(com.codahale.metrics.Histogram)'


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to