Skip to content

Commit a1d3469

Browse files
authored
Merge pull request #38503 from Abacn/cp
Cherry-pick #38488 and #38500 into release branch
2 parents 9363afa + 6ae3da8 commit a1d3469

7 files changed

Lines changed: 29 additions & 11 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
}
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": 2
3+
"modification": 3
44
}

sdks/java/extensions/sql/iceberg/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ dependencies {
4848
testImplementation library.java.google_api_services_bigquery
4949
testImplementation "org.apache.iceberg:iceberg-api:1.9.2"
5050
testImplementation "org.apache.iceberg:iceberg-core:1.9.2"
51+
testRuntimeOnly library.java.bigdataoss_util_hadoop
5152
testImplementation project(":sdks:java:io:google-cloud-platform")
5253
testImplementation project(":sdks:java:extensions:google-cloud-platform-core")
5354
}

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

Lines changed: 14 additions & 6 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 {
@@ -83,12 +93,10 @@ dependencies {
8393
permitUnusedDeclared project(":sdks:java:extensions:kafka-factories")
8494
runtimeOnly project(":sdks:java:io:amazon-web-services2") // FileSystem may be used by Iceberg AddFiles
8595

86-
if (JavaVersion.current().compareTo(JavaVersion.VERSION_11) >= 0 && project.findProperty('testJavaVersion') != '8') {
87-
// iceberg ended support for Java 8 in 1.7.0
88-
runtimeOnly project(":sdks:java:io:iceberg")
89-
runtimeOnly project(":sdks:java:io:iceberg:hive")
90-
runtimeOnly project(path: ":sdks:java:io:iceberg:bqms", configuration: "shadow")
91-
}
96+
runtimeOnly project(":sdks:java:io:iceberg")
97+
runtimeOnly project(":sdks:java:io:iceberg:hive")
98+
runtimeOnly project(path: ":sdks:java:io:iceberg:bqms", configuration: "shadow")
99+
runtimeOnly library.java.bigdataoss_util_hadoop
92100

93101
runtimeOnly library.java.kafka_clients
94102
runtimeOnly library.java.slf4j_jdk14

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)