diff --git a/docs/docs/flink-writes.md b/docs/docs/flink-writes.md index 09fa22b640c7..c904635d0dbb 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 53f87f27aa67..6dc373e6b566 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 36a03cb4fcf9..e8c4c4a0bdf7 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 00c53ed388d0..3dfc56f15ea9 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