Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 32f5be6

Browse files
authored
Update iceberg to 1.9.2 (#35981)
* update iceberg to 1.9.2 * cleanup * move iceberg sql into a separate module * check test java version too * cleanup * spotless * deps * add missing dep * block java 8 * create examples/iceberg module * dep fixes * import fixes * test fix * update changes * update changes * include integration tests * add examples:iceberg to javaPreCommit * fix deps * fix deps
1 parent 0ba89bb commit 32f5be6

30 files changed

Lines changed: 274 additions & 44 deletions
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": 3
3+
"modification": 4
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": 5
3+
"modification": 1
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": 5
3+
"modification": 1
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": 4
3+
"modification": 2
44
}

CHANGES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102
## I/Os
103103

104104
* Support for X source added (Java/Python) ([#X](https://github.com/apache/beam/issues/X)).
105+
* Upgraded Iceberg dependency to 1.9.2 ([#35981](https://github.com/apache/beam/pull/35981))
105106

106107
## New Features / Improvements
107108

@@ -131,6 +132,7 @@
131132
significant digits related to casting.
132133
* (Python) The deterministic fallback coder for complex types like NamedTuple, Enum, and dataclasses now uses cloudpickle instead of dill. If your pipeline is affected, you may see a warning like: "Using fallback deterministic coder for type X...". You can revert to the previous behavior by using the pipeline option `--update_compatibility_version=2.67.0` ([35725](https://github.com/apache/beam/pull/35725)). Report any pickling related issues to [#34903](https://github.com/apache/beam/issues/34903)
133134
* (Python) Prism runner now enabled by default for most Python pipelines using the direct runner ([#34612](https://github.com/apache/beam/pull/34612)). This may break some tests, see https://github.com/apache/beam/pull/34612 for details on how to handle issues.
135+
* Dropped Java 8 support for [IO expansion-service](https://central.sonatype.com/artifact/org.apache.beam/beam-sdks-java-io-expansion-service). Cross-language pipelines using this expansion service will need a Java11+ runtime ([#35981](https://github.com/apache/beam/pull/35981).
134136

135137
## Deprecations
136138

build.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ tasks.register("javaPreCommit") {
253253
dependsOn(":examples:java:sql:preCommit")
254254
dependsOn(":examples:java:twitter:build")
255255
dependsOn(":examples:java:twitter:preCommit")
256+
dependsOn(":examples:java:iceberg:build")
256257
dependsOn(":examples:multi-language:build")
257258
dependsOn(":model:fn-execution:build")
258259
dependsOn(":model:job-management:build")
@@ -380,6 +381,7 @@ tasks.register("sqlPreCommit") {
380381
dependsOn(":sdks:java:extensions:sql:datacatalog:build")
381382
dependsOn(":sdks:java:extensions:sql:expansion-service:build")
382383
dependsOn(":sdks:java:extensions:sql:hcatalog:build")
384+
dependsOn(":sdks:java:extensions:sql:iceberg:build")
383385
dependsOn(":sdks:java:extensions:sql:jdbc:build")
384386
dependsOn(":sdks:java:extensions:sql:jdbc:preCommit")
385387
dependsOn(":sdks:java:extensions:sql:perf-tests:build")
@@ -426,6 +428,7 @@ tasks.register("sqlPostCommit") {
426428
dependsOn(":sdks:java:extensions:sql:postCommit")
427429
dependsOn(":sdks:java:extensions:sql:jdbc:postCommit")
428430
dependsOn(":sdks:java:extensions:sql:datacatalog:postCommit")
431+
dependsOn(":sdks:java:extensions:sql:iceberg:integrationTest")
429432
dependsOn(":sdks:java:extensions:sql:hadoopVersionsTest")
430433
}
431434

examples/java/build.gradle

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@ dependencies {
7171
implementation project(":sdks:java:extensions:python")
7272
implementation project(":sdks:java:io:google-cloud-platform")
7373
implementation project(":sdks:java:io:kafka")
74-
runtimeOnly project(":sdks:java:io:iceberg")
75-
runtimeOnly project(":sdks:java:io:iceberg:bqms")
76-
implementation project(":sdks:java:managed")
7774
implementation project(":sdks:java:extensions:ml")
7875
implementation library.java.avro
7976
implementation library.java.bigdataoss_util

examples/java/iceberg/build.gradle

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* License); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an AS IS BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
20+
plugins {
21+
id 'java'
22+
id 'org.apache.beam.module'
23+
id 'com.gradleup.shadow'
24+
}
25+
26+
applyJavaNature(
27+
exportJavadoc: false,
28+
automaticModuleName: 'org.apache.beam.examples.iceberg',
29+
// iceberg requires Java11+
30+
requireJavaVersion: JavaVersion.VERSION_11
31+
)
32+
33+
description = "Apache Beam :: Examples :: Java :: Iceberg"
34+
ext.summary = """Apache Beam Java SDK examples using IcebergIO."""
35+
36+
/** Define the list of runners which execute a precommit test.
37+
* Some runners are run from separate projects, see the preCommit task below
38+
* for details.
39+
*/
40+
def preCommitRunners = ["directRunner", "flinkRunner", "sparkRunner"]
41+
// The following runners have configuration created but not added to preCommit
42+
def nonPreCommitRunners = ["dataflowRunner", "prismRunner"]
43+
for (String runner : preCommitRunners) {
44+
configurations.create(runner + "PreCommit")
45+
}
46+
for (String runner: nonPreCommitRunners) {
47+
configurations.create(runner + "PreCommit")
48+
}
49+
configurations.sparkRunnerPreCommit {
50+
// Ban certain dependencies to prevent a StackOverflow within Spark
51+
// because JUL -> SLF4J -> JUL, and similarly JDK14 -> SLF4J -> JDK14
52+
exclude group: "org.slf4j", module: "jul-to-slf4j"
53+
exclude group: "org.slf4j", module: "slf4j-jdk14"
54+
}
55+
56+
dependencies {
57+
implementation enforcedPlatform(library.java.google_cloud_platform_libraries_bom)
58+
runtimeOnly project(":sdks:java:io:iceberg")
59+
runtimeOnly project(":sdks:java:io:iceberg:bqms")
60+
implementation project(path: ":sdks:java:core", configuration: "shadow")
61+
implementation project(":sdks:java:extensions:google-cloud-platform-core")
62+
implementation project(":sdks:java:io:google-cloud-platform")
63+
implementation project(":sdks:java:managed")
64+
implementation library.java.google_auth_library_oauth2_http
65+
implementation library.java.joda_time
66+
runtimeOnly project(path: ":runners:direct-java", configuration: "shadow")
67+
implementation library.java.vendored_guava_32_1_2_jre
68+
runtimeOnly library.java.hadoop_client
69+
runtimeOnly library.java.bigdataoss_gcs_connector
70+
71+
// Add dependencies for the PreCommit configurations
72+
// For each runner a project level dependency on the examples project.
73+
for (String runner : preCommitRunners) {
74+
delegate.add(runner + "PreCommit", project(path: ":examples:java", configuration: "testRuntimeMigration"))
75+
}
76+
directRunnerPreCommit project(path: ":runners:direct-java", configuration: "shadow")
77+
flinkRunnerPreCommit project(":runners:flink:${project.ext.latestFlinkVersion}")
78+
sparkRunnerPreCommit project(":runners:spark:3")
79+
sparkRunnerPreCommit project(":sdks:java:io:hadoop-file-system")
80+
dataflowRunnerPreCommit project(":runners:google-cloud-dataflow-java")
81+
dataflowRunnerPreCommit project(":runners:google-cloud-dataflow-java:worker") // v2 worker
82+
dataflowRunnerPreCommit project(":sdks:java:harness") // v2 worker
83+
prismRunnerPreCommit project(":runners:prism:java")
84+
85+
// Add dependency if requested on command line for runner
86+
if (project.hasProperty("runnerDependency")) {
87+
runtimeOnly project(path: project.getProperty("runnerDependency"))
88+
}
89+
}

examples/java/src/main/java/org/apache/beam/examples/cookbook/IcebergBatchWriteExample.java renamed to examples/java/iceberg/src/main/java/org/apache/beam/examples/iceberg/IcebergBatchWriteExample.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* See the License for the specific language governing permissions and
1616
* limitations under the License.
1717
*/
18-
package org.apache.beam.examples.cookbook;
18+
package org.apache.beam.examples.iceberg;
1919

2020
import java.io.IOException;
2121
import java.util.Map;

examples/java/src/main/java/org/apache/beam/examples/cookbook/IcebergRestCatalogCDCExample.java renamed to examples/java/iceberg/src/main/java/org/apache/beam/examples/iceberg/IcebergRestCatalogCDCExample.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* See the License for the specific language governing permissions and
1616
* limitations under the License.
1717
*/
18-
package org.apache.beam.examples.cookbook;
18+
package org.apache.beam.examples.iceberg;
1919

2020
import static org.apache.beam.sdk.managed.Managed.ICEBERG_CDC;
2121

0 commit comments

Comments
 (0)