Skip to content

flink-metrics-dropwizard missing from test runner classpath causes Iceberg sink WARN on startup #360

Description

@mbroecheler

Summary

When running the DataSQRL test runner, the following warning appears on every Flink task startup:

WARN org.apache.iceberg.flink.sink.IcebergStreamWriterMetrics - Cannot load Dropwizard metrics; is org.apache.flink:flink-metrics-dropwizard on the classpath?
java.lang.NoSuchMethodException: Cannot find constructor for interface org.apache.flink.metrics.Histogram
    Missing org.apache.flink.dropwizard.metrics.DropwizardHistogramWrapper [java.lang.ClassNotFoundException: ...]

Root Cause

IcebergStreamWriterMetrics attempts to load org.apache.flink.dropwizard.metrics.DropwizardHistogramWrapper in a static initializer. The class is absent because flink-metrics-dropwizard is not included in the test runner classpath/fat-jar.

Impact

  • Severity: Low — the sink falls back gracefully and ingestion is unaffected.
  • Effect: Histogram metrics (write latency, file size distributions, etc.) from the Iceberg sink are silently unavailable.
  • Noise: The WARN pollutes test runner logs on every task startup.

Fix

Add flink-metrics-dropwizard as a runtime dependency, matching the Flink version in use:

<dependency>
    <groupId>org.apache.flink</groupId>
    <artifactId>flink-metrics-dropwizard</artifactId>
    <version>${flink.version}</version>
    <scope>runtime</scope>
</dependency>

Environment

  • Observed: 2026-06-23 15:10:01
  • Operator: SourceIngestionStats: Writer (1/1)#0
  • Failing class: org.apache.iceberg.flink.sink.IcebergStreamWriterMetrics

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions