You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by bl...@apache.org on 2026/04/28 16:06:15 UTC
(iceberg) branch main updated: Flink: Bundle flink-metrics-dropwizard in runtime jar (#16126)
This is an automated email from the ASF dual-hosted git repository.
rdblue pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg.git
The following commit(s) were added to refs/heads/main by this push:
new dd45bd926b Flink: Bundle flink-metrics-dropwizard in runtime jar (#16126)
dd45bd926b is described below
commit dd45bd926bed9bfdca28aa1221d05d39e3dcfd59
Author: Maximilian Michels <mx...@apache.org>
AuthorDate: Tue Apr 28 18:06:08 2026 +0200
Flink: Bundle flink-metrics-dropwizard in runtime jar (#16126)
Iceberg uses Dropwizard metrics for Hisograms. Flink does not ship this optional
dependency by default. In order for histograms to continue to work, we should
add back the runtime dependency removed in #16093.
---
docs/docs/flink-writes.md | 4 ++++
flink/v2.1/build.gradle | 5 ++++-
flink/v2.1/flink-runtime/LICENSE | 10 +++++++++-
flink/v2.1/flink-runtime/runtime-deps.txt | 2 ++
4 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/docs/docs/flink-writes.md b/docs/docs/flink-writes.md
index 09fa22b640..c904635d0d 100644
--- a/docs/docs/flink-writes.md
+++ b/docs/docs/flink-writes.md
@@ -207,6 +207,10 @@ They should have the following key-value tags.
| dataFilesSizeHistogram | Histogram | Histogram distribution of data file sizes (in bytes). |
| deleteFilesSizeHistogram | Histogram | Histogram distribution of delete file sizes (in bytes). |
+The `Histogram` metrics above require `flink-metrics-dropwizard` on the classpath, which is not shipped
+by Flink by default. When using `iceberg-flink-runtime`, this dependency is already bundled. When using
+the `iceberg-flink` artifact directly, add `org.apache.flink:flink-metrics-dropwizard` as a dependency.
+
Committer metrics are added under the sub group of `IcebergFilesCommitter`.
They should have the following key-value tags.
diff --git a/flink/v2.1/build.gradle b/flink/v2.1/build.gradle
index 53f87f27aa..6dc373e6b5 100644
--- a/flink/v2.1/build.gradle
+++ b/flink/v2.1/build.gradle
@@ -33,7 +33,7 @@ project(":iceberg-flink:iceberg-flink-${flinkMajorVersion}") {
implementation project(':iceberg-hive-metastore')
compileOnly libs.flink21.avro
- // for dropwizard histogram metrics implementation
+ // dropwizard histogram metrics (optional in Flink)
compileOnly libs.flink21.metrics.dropwizard
compileOnly libs.flink21.streaming.java
compileOnly "${libs.flink21.streaming.java.get().module}:${libs.flink21.streaming.java.get().getVersion()}:tests"
@@ -169,6 +169,9 @@ project(":iceberg-flink:iceberg-flink-runtime-${flinkMajorVersion}") {
exclude group: 'com.google.code.findbugs', module: 'jsr305'
}
+ // To support dropwizard histogram metrics (not shipped by Flink by default)
+ implementation libs.flink21.metrics.dropwizard
+
// for integration testing with the flink-runtime-jar
// all of those dependencies are required because the integration test extends FlinkTestBase
integrationCompileOnly project(':iceberg-api')
diff --git a/flink/v2.1/flink-runtime/LICENSE b/flink/v2.1/flink-runtime/LICENSE
index 36a03cb4fc..e8c4c4a0bd 100644
--- a/flink/v2.1/flink-runtime/LICENSE
+++ b/flink/v2.1/flink-runtime/LICENSE
@@ -556,7 +556,7 @@ License: Apache License, Version 2.0 - https://www.apache.org/licenses/LICENSE-2
--------------------------------------------------------------------------------
-This product bundles Codahale Metrics.
+This product bundles Dropwizard Metrics.
Copyright: (c) 2010-2013 Coda Hale, Yammer.com, 2014-2021 Dropwizard Team
Project URL: https://github.com/dropwizard/metrics
@@ -564,6 +564,14 @@ License: Apache License, Version 2.0 - https://www.apache.org/licenses/LICENSE-2
--------------------------------------------------------------------------------
+This product bundles Apache Flink's optional support for Dropwizard Metrics.
+
+Copyright: 2014-2026 The Apache Software Foundation
+Project URL: https://flink.apache.org/
+License: Apache License, Version 2.0 - https://www.apache.org/licenses/LICENSE-2.0
+
+--------------------------------------------------------------------------------
+
This product bundles RoaringBitmap.
Copyright: (c) 2013-... the RoaringBitmap authors
diff --git a/flink/v2.1/flink-runtime/runtime-deps.txt b/flink/v2.1/flink-runtime/runtime-deps.txt
index 00c53ed388..3dfc56f15e 100644
--- a/flink/v2.1/flink-runtime/runtime-deps.txt
+++ b/flink/v2.1/flink-runtime/runtime-deps.txt
@@ -6,9 +6,11 @@ com.github.luben:zstd-jni:1.5.7-3
com.google.errorprone:error_prone_annotations:2.10.0
dev.failsafe:failsafe:3.3.2
io.airlift:aircompressor:2.0.3
+io.dropwizard.metrics:metrics-core:3.2.6
org.apache.avro:avro:1.12.1
org.apache.datasketches:datasketches-java:6.2.0
org.apache.datasketches:datasketches-memory:3.0.2
+org.apache.flink:flink-metrics-dropwizard:2.1.0
org.apache.httpcomponents.client5:httpclient5:5.6
org.apache.httpcomponents.core5:httpcore5-h2:5.4
org.apache.httpcomponents.core5:httpcore5:5.4