Skip to content

Commit 9a1a4b1

Browse files
authored
[Iceberg] pin hadoop to 3.3.6 (#38500)
* pin hadoop to 3.3.6 * pin in expansion service too
1 parent 5b5cd65 commit 9a1a4b1

5 files changed

Lines changed: 23 additions & 4 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"comment": "Modify this file in a trivial way to cause this test suite to run.",
3-
"modification": 1
3+
"modification": 2
44
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"comment": "Modify this file in a trivial way to cause this test suite to run.",
3-
"modification": 1
3+
"modification": 2
44
}

sdks/java/io/expansion-service/build.gradle

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,16 @@ configurations.runtimeClasspath {
5757

5858
// Pin nimbus-jose-jwt to 9.37.4 to fix CVE-2025-53864 (transitive via hadoop-auth)
5959
resolutionStrategy.force 'com.nimbusds:nimbus-jose-jwt:9.37.4'
60+
61+
// [iceberg]
62+
// bigdataoss:gcs-connector and parquet:parquet-hadoop have conflicts with global hadoop-common:3.4.2
63+
// upgrading gcs-connector to 4.0.0 would be fine, because it uses hadoop-common 3.4.2
64+
// but parquet-hadoop is still at 3.3.0
65+
// so for now we need to pin hadoop to 3.3.6 until parquet-hadoop releases a version that uses hadoop 3.4.2+
66+
resolutionStrategy.force 'org.apache.hadoop:hadoop-common:3.3.6'
67+
resolutionStrategy.force 'org.apache.hadoop:hadoop-client:3.3.6'
68+
resolutionStrategy.force 'org.apache.hadoop:hadoop-hdfs:3.3.6'
69+
resolutionStrategy.force 'org.apache.hadoop:hadoop-hdfs-client:3.3.6'
6070
}
6171

6272
shadowJar {

sdks/java/io/iceberg/build.gradle

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ dependencies {
5959
implementation "org.apache.iceberg:iceberg-parquet:$iceberg_version"
6060
implementation "org.apache.iceberg:iceberg-orc:$iceberg_version"
6161
implementation "org.apache.iceberg:iceberg-data:$iceberg_version"
62-
implementation library.java.hadoop_common
62+
implementation "org.apache.hadoop:hadoop-common:3.3.6"
6363
// TODO(https://github.com/apache/beam/issues/21156): Determine how to build without this dependency
6464
provided "org.immutables:value:2.8.8"
6565
permitUnusedDeclared "org.immutables:value:2.8.8"
@@ -70,6 +70,7 @@ dependencies {
7070
runtimeOnly "org.apache.iceberg:iceberg-azure:$iceberg_version"
7171
runtimeOnly "org.apache.iceberg:iceberg-azure-bundle:$iceberg_version"
7272
runtimeOnly library.java.bigdataoss_gcs_connector
73+
runtimeOnly library.java.bigdataoss_util_hadoop
7374
runtimeOnly library.java.hadoop_client
7475

7576
testImplementation project(":sdks:java:managed")
@@ -117,6 +118,14 @@ dependencies {
117118
configurations.all {
118119
// iceberg-core needs avro:1.12.0
119120
resolutionStrategy.force 'org.apache.avro:avro:1.12.0'
121+
// bigdataoss:gcs-connector and parquet:parquet-hadoop have conflicts with global hadoop-common:3.4.2
122+
// upgrading gcs-connector to 4.0.0 would be fine, because it uses hadoop-common 3.4.2
123+
// but parquet-hadoop is still at 3.3.0
124+
// so for now we need to pin hadoop to 3.3.6 until parquet-hadoop releases a version that uses hadoop 3.4.2+
125+
resolutionStrategy.force 'org.apache.hadoop:hadoop-common:3.3.6'
126+
resolutionStrategy.force 'org.apache.hadoop:hadoop-client:3.3.6'
127+
resolutionStrategy.force 'org.apache.hadoop:hadoop-hdfs:3.3.6'
128+
resolutionStrategy.force 'org.apache.hadoop:hadoop-hdfs-client:3.3.6'
120129
}
121130

122131
hadoopVersions.each {kv ->

sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg/IcebergScanConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Preconditions.checkArgument;
2121
import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Preconditions.checkNotNull;
22-
import static org.apache.hadoop.util.Sets.newHashSet;
22+
import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.Sets.newHashSet;
2323

2424
import com.google.auto.value.AutoValue;
2525
import java.io.Serializable;

0 commit comments

Comments
 (0)