From 45533fab7ddfebadb9ad9faf5ce4a5f98d08b85e Mon Sep 17 00:00:00 2001 From: huzheng Date: Mon, 25 Oct 2021 15:38:08 +0800 Subject: [PATCH 01/11] Build: Flink CI work against on both flink 1.12.5 & 1.13.2 --- .github/workflows/flink-ci.yml | 2 +- flink/build.gradle | 24 ++++++++++++++---------- gradle.properties | 4 ++-- settings.gradle | 2 +- 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/.github/workflows/flink-ci.yml b/.github/workflows/flink-ci.yml index cd8a16c0c4cb..3cb505b2f89a 100644 --- a/.github/workflows/flink-ci.yml +++ b/.github/workflows/flink-ci.yml @@ -54,7 +54,7 @@ jobs: strategy: matrix: jvm: [8, 11] - flink: ['1.13'] + flink: ['1.12.5', '1.13.2'] env: SPARK_LOCAL_IP: localhost steps: diff --git a/flink/build.gradle b/flink/build.gradle index 994861ae27d2..4fd6a0f590e0 100644 --- a/flink/build.gradle +++ b/flink/build.gradle @@ -18,6 +18,10 @@ */ project(':iceberg-flink') { + project.ext { + flinkVersion = System.getProperty("flinkVersions") != null ? System.getProperty("flinkVersions") : "" + } + dependencies { implementation project(path: ':iceberg-bundled-guava', configuration: 'shadow') api project(':iceberg-api') @@ -28,11 +32,11 @@ project(':iceberg-flink') { implementation project(':iceberg-parquet') implementation project(':iceberg-hive-metastore') - compileOnly "org.apache.flink:flink-streaming-java_2.12" - compileOnly "org.apache.flink:flink-streaming-java_2.12::tests" - compileOnly "org.apache.flink:flink-table-api-java-bridge_2.12" - compileOnly "org.apache.flink:flink-table-planner-blink_2.12" - compileOnly "org.apache.flink:flink-table-planner_2.12" + compileOnly "org.apache.flink:flink-streaming-java_2.12:${flinkVersion}" + compileOnly "org.apache.flink:flink-streaming-java_2.12:${flinkVersion}:tests" + compileOnly "org.apache.flink:flink-table-api-java-bridge_2.12:${flinkVersion}" + compileOnly "org.apache.flink:flink-table-planner-blink_2.12:${flinkVersion}" + compileOnly "org.apache.flink:flink-table-planner_2.12:${flinkVersion}" compileOnly "org.apache.hadoop:hadoop-hdfs" compileOnly "org.apache.hadoop:hadoop-common" compileOnly("org.apache.hadoop:hadoop-minicluster") { @@ -56,13 +60,13 @@ project(':iceberg-flink') { exclude group: 'org.apache.hive', module: 'hive-storage-api' } - testImplementation "org.apache.flink:flink-core" - testImplementation "org.apache.flink:flink-runtime_2.12" - testImplementation "org.apache.flink:flink-table-planner-blink_2.12" - testImplementation ("org.apache.flink:flink-test-utils-junit") { + testImplementation "org.apache.flink:flink-core:${flinkVersion}" + testImplementation "org.apache.flink:flink-runtime_2.12:${flinkVersion}" + testImplementation "org.apache.flink:flink-table-planner-blink_2.12:${flinkVersion}" + testImplementation ("org.apache.flink:flink-test-utils-junit:${flinkVersion}") { exclude group: 'junit' } - testImplementation("org.apache.flink:flink-test-utils_2.12") { + testImplementation("org.apache.flink:flink-test-utils_2.12:${flinkVersion}") { exclude group: "org.apache.curator", module: 'curator-test' exclude group: 'junit' } diff --git a/gradle.properties b/gradle.properties index d7ed4a2adf3e..094428a12341 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,8 +15,8 @@ jmhOutputPath=build/reports/jmh/human-readable-output.txt jmhIncludeRegex=.* -systemProp.defaultFlinkVersions=1.13 -systemProp.knownFlinkVersions=1.13 +systemProp.defaultFlinkVersions=1.12.5 +systemProp.knownFlinkVersions=1.12.5,1.13.2 systemProp.defaultHiveVersions=2,3 systemProp.knownHiveVersions=2,3 systemProp.defaultSparkVersions=2.4,3.0,3.2 diff --git a/settings.gradle b/settings.gradle index 267a0b98f6c8..17042a1b8cd1 100644 --- a/settings.gradle +++ b/settings.gradle @@ -72,7 +72,7 @@ if (!knownSparkVersions.containsAll(sparkVersions)) { throw new GradleException("Found unsupported Spark versions: " + (sparkVersions - knownSparkVersions)) } -if (flinkVersions.contains("1.13")) { +if (flinkVersions.contains("1.12.5") || flinkVersions.contains("1.13.2")) { include 'flink' include 'flink-runtime' project(':flink').name = 'iceberg-flink' From ea7d84f0cddd28c8257730dbfa0a3baeb9fd2ec2 Mon Sep 17 00:00:00 2001 From: huzheng Date: Wed, 27 Oct 2021 10:27:38 +0800 Subject: [PATCH 02/11] Revert "Build: Flink CI work against on both flink 1.12.5 & 1.13.2" This reverts commit 45533fab7ddfebadb9ad9faf5ce4a5f98d08b85e. --- .github/workflows/flink-ci.yml | 2 +- flink/build.gradle | 24 ++++++++++-------------- gradle.properties | 4 ++-- settings.gradle | 2 +- 4 files changed, 14 insertions(+), 18 deletions(-) diff --git a/.github/workflows/flink-ci.yml b/.github/workflows/flink-ci.yml index 3cb505b2f89a..cd8a16c0c4cb 100644 --- a/.github/workflows/flink-ci.yml +++ b/.github/workflows/flink-ci.yml @@ -54,7 +54,7 @@ jobs: strategy: matrix: jvm: [8, 11] - flink: ['1.12.5', '1.13.2'] + flink: ['1.13'] env: SPARK_LOCAL_IP: localhost steps: diff --git a/flink/build.gradle b/flink/build.gradle index 4fd6a0f590e0..994861ae27d2 100644 --- a/flink/build.gradle +++ b/flink/build.gradle @@ -18,10 +18,6 @@ */ project(':iceberg-flink') { - project.ext { - flinkVersion = System.getProperty("flinkVersions") != null ? System.getProperty("flinkVersions") : "" - } - dependencies { implementation project(path: ':iceberg-bundled-guava', configuration: 'shadow') api project(':iceberg-api') @@ -32,11 +28,11 @@ project(':iceberg-flink') { implementation project(':iceberg-parquet') implementation project(':iceberg-hive-metastore') - compileOnly "org.apache.flink:flink-streaming-java_2.12:${flinkVersion}" - compileOnly "org.apache.flink:flink-streaming-java_2.12:${flinkVersion}:tests" - compileOnly "org.apache.flink:flink-table-api-java-bridge_2.12:${flinkVersion}" - compileOnly "org.apache.flink:flink-table-planner-blink_2.12:${flinkVersion}" - compileOnly "org.apache.flink:flink-table-planner_2.12:${flinkVersion}" + compileOnly "org.apache.flink:flink-streaming-java_2.12" + compileOnly "org.apache.flink:flink-streaming-java_2.12::tests" + compileOnly "org.apache.flink:flink-table-api-java-bridge_2.12" + compileOnly "org.apache.flink:flink-table-planner-blink_2.12" + compileOnly "org.apache.flink:flink-table-planner_2.12" compileOnly "org.apache.hadoop:hadoop-hdfs" compileOnly "org.apache.hadoop:hadoop-common" compileOnly("org.apache.hadoop:hadoop-minicluster") { @@ -60,13 +56,13 @@ project(':iceberg-flink') { exclude group: 'org.apache.hive', module: 'hive-storage-api' } - testImplementation "org.apache.flink:flink-core:${flinkVersion}" - testImplementation "org.apache.flink:flink-runtime_2.12:${flinkVersion}" - testImplementation "org.apache.flink:flink-table-planner-blink_2.12:${flinkVersion}" - testImplementation ("org.apache.flink:flink-test-utils-junit:${flinkVersion}") { + testImplementation "org.apache.flink:flink-core" + testImplementation "org.apache.flink:flink-runtime_2.12" + testImplementation "org.apache.flink:flink-table-planner-blink_2.12" + testImplementation ("org.apache.flink:flink-test-utils-junit") { exclude group: 'junit' } - testImplementation("org.apache.flink:flink-test-utils_2.12:${flinkVersion}") { + testImplementation("org.apache.flink:flink-test-utils_2.12") { exclude group: "org.apache.curator", module: 'curator-test' exclude group: 'junit' } diff --git a/gradle.properties b/gradle.properties index 094428a12341..d7ed4a2adf3e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,8 +15,8 @@ jmhOutputPath=build/reports/jmh/human-readable-output.txt jmhIncludeRegex=.* -systemProp.defaultFlinkVersions=1.12.5 -systemProp.knownFlinkVersions=1.12.5,1.13.2 +systemProp.defaultFlinkVersions=1.13 +systemProp.knownFlinkVersions=1.13 systemProp.defaultHiveVersions=2,3 systemProp.knownHiveVersions=2,3 systemProp.defaultSparkVersions=2.4,3.0,3.2 diff --git a/settings.gradle b/settings.gradle index 17042a1b8cd1..267a0b98f6c8 100644 --- a/settings.gradle +++ b/settings.gradle @@ -72,7 +72,7 @@ if (!knownSparkVersions.containsAll(sparkVersions)) { throw new GradleException("Found unsupported Spark versions: " + (sparkVersions - knownSparkVersions)) } -if (flinkVersions.contains("1.12.5") || flinkVersions.contains("1.13.2")) { +if (flinkVersions.contains("1.13")) { include 'flink' include 'flink-runtime' project(':flink').name = 'iceberg-flink' From 5359dc1e655c4ec6935a69b9968115d27fd0062a Mon Sep 17 00:00:00 2001 From: huzheng Date: Wed, 27 Oct 2021 13:31:29 +0800 Subject: [PATCH 03/11] Separate the build process for flink1.12 & flink1.13 --- flink/build.gradle | 10 +++ flink/v1.12/build.gradle | 129 +++++++++++++++++++++++++++++++++++++++ flink/v1.13/build.gradle | 128 ++++++++++++++++++++++++++++++++++++++ gradle.properties | 4 +- settings.gradle | 17 ++++-- 5 files changed, 282 insertions(+), 6 deletions(-) create mode 100644 flink/v1.12/build.gradle create mode 100644 flink/v1.13/build.gradle diff --git a/flink/build.gradle b/flink/build.gradle index 994861ae27d2..f739bfc00f1a 100644 --- a/flink/build.gradle +++ b/flink/build.gradle @@ -106,3 +106,13 @@ project(':iceberg-flink') { } } +def flinkVersions = (System.getProperty("flinkVersions") != null ? System.getProperty("flinkVersions") : System.getProperty("defaultFlinkVersions")).split(",") + +if (flinkVersions.contains("1.12")) { + apply from: file("$projectDir/v1.12/build.gradle") +} + +if (flinkVersions.contains("1.13")) { + apply from: file("$projectDir/v1.13/build.gradle") +} + diff --git a/flink/v1.12/build.gradle b/flink/v1.12/build.gradle new file mode 100644 index 000000000000..5ee2715aa2f5 --- /dev/null +++ b/flink/v1.12/build.gradle @@ -0,0 +1,129 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +def flinkProjects = [ + project(':iceberg-flink:iceberg-flink-1.12'), + // TODO project(':iceberg-flink-1.12-runtime') +] + +configure(flinkProjects) { + project.ext { + flinkVersion = '1.12.5' + } +} + +project(':iceberg-flink:iceberg-flink-1.12') { + apply plugin: 'scala' + + sourceSets { + main { + java.srcDirs = ["src/main/java"] + resources.srcDirs = ["src/main/resources"] + } + } + + dependencies { + implementation project(path: ':iceberg-bundled-guava', configuration: 'shadow') + api project(':iceberg-api') + implementation project(':iceberg-common') + implementation project(':iceberg-core') + api project(':iceberg-data') + implementation project(':iceberg-orc') + implementation project(':iceberg-parquet') + implementation project(':iceberg-hive-metastore') + implementation project(":iceberg-flink") + + compileOnly "org.apache.flink:flink-streaming-java_2.12:${flinkVersion}" + compileOnly "org.apache.flink:flink-streaming-java_2.12:${flinkVersion}:tests" + compileOnly "org.apache.flink:flink-table-api-java-bridge_2.12:${flinkVersion}" + compileOnly "org.apache.flink:flink-table-planner-blink_2.12:${flinkVersion}" + compileOnly "org.apache.flink:flink-table-planner_2.12:${flinkVersion}" + compileOnly "org.apache.hadoop:hadoop-hdfs" + compileOnly "org.apache.hadoop:hadoop-common" + compileOnly("org.apache.hadoop:hadoop-minicluster") { + exclude group: 'org.apache.avro', module: 'avro' + } + + implementation("org.apache.parquet:parquet-avro") { + exclude group: 'org.apache.avro', module: 'avro' + // already shaded by Parquet + exclude group: 'it.unimi.dsi' + exclude group: 'org.codehaus.jackson' + } + + compileOnly "org.apache.avro:avro" + + implementation("org.apache.orc:orc-core::nohive") { + exclude group: 'org.apache.hadoop' + exclude group: 'commons-lang' + // These artifacts are shaded and included in the orc-core fat jar + exclude group: 'com.google.protobuf', module: 'protobuf-java' + exclude group: 'org.apache.hive', module: 'hive-storage-api' + } + + testImplementation "org.apache.flink:flink-core:${flinkVersion}" + testImplementation "org.apache.flink:flink-runtime_2.12:${flinkVersion}" + testImplementation "org.apache.flink:flink-table-planner-blink_2.12:${flinkVersion}" + testImplementation ("org.apache.flink:flink-test-utils-junit:${flinkVersion}") { + exclude group: 'junit' + } + testImplementation("org.apache.flink:flink-test-utils_2.12:${flinkVersion}") { + exclude group: "org.apache.curator", module: 'curator-test' + exclude group: 'junit' + } + + testImplementation project(path: ':iceberg-hive-metastore', configuration: 'testArtifacts') + testImplementation project(path: ':iceberg-api', configuration: 'testArtifacts') + testImplementation project(path: ':iceberg-core', configuration: 'testArtifacts') + testImplementation project(path: ':iceberg-data', configuration: 'testArtifacts') + + // By default, hive-exec is a fat/uber jar and it exports a guava library + // that's really old. We use the core classifier to be able to override our guava + // version. Luckily, hive-exec seems to work okay so far with this version of guava + // See: https://github.com/apache/hive/blob/master/ql/pom.xml#L911 for more context. + testImplementation("org.apache.hive:hive-exec::core") { + exclude group: 'org.apache.avro', module: 'avro' + exclude group: 'org.slf4j', module: 'slf4j-log4j12' + exclude group: 'org.pentaho' // missing dependency + exclude group: 'org.apache.hive', module: 'hive-llap-tez' + exclude group: 'org.apache.logging.log4j' + exclude group: 'com.google.protobuf', module: 'protobuf-java' + exclude group: 'org.apache.calcite' + exclude group: 'org.apache.calcite.avatica' + exclude group: 'com.google.code.findbugs', module: 'jsr305' + } + + testImplementation("org.apache.hive:hive-metastore") { + exclude group: 'org.apache.avro', module: 'avro' + exclude group: 'org.slf4j', module: 'slf4j-log4j12' + exclude group: 'org.pentaho' // missing dependency + exclude group: 'org.apache.hbase' + exclude group: 'org.apache.logging.log4j' + exclude group: 'co.cask.tephra' + exclude group: 'com.google.code.findbugs', module: 'jsr305' + exclude group: 'org.eclipse.jetty.aggregate', module: 'jetty-all' + exclude group: 'org.eclipse.jetty.orbit', module: 'javax.servlet' + exclude group: 'org.apache.parquet', module: 'parquet-hadoop-bundle' + exclude group: 'com.tdunning', module: 'json' + exclude group: 'javax.transaction', module: 'transaction-api' + exclude group: 'com.zaxxer', module: 'HikariCP' + } + } +} + diff --git a/flink/v1.13/build.gradle b/flink/v1.13/build.gradle new file mode 100644 index 000000000000..94cc2911d7f5 --- /dev/null +++ b/flink/v1.13/build.gradle @@ -0,0 +1,128 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +def flinkProjects = [ + project(':iceberg-flink:iceberg-flink-1.13'), + // project(':iceberg-flink-1.13-runtime') +] + +configure(flinkProjects) { + project.ext { + flinkVersion = '1.13.2' + } +} + +project(':iceberg-flink:iceberg-flink-1.13') { + apply plugin: 'scala' + + sourceSets { + main { + java.srcDirs = ["src/main/java"] + resources.srcDirs = ["src/main/resources"] + } + } + + dependencies { + implementation project(path: ':iceberg-bundled-guava', configuration: 'shadow') + api project(':iceberg-api') + implementation project(':iceberg-common') + implementation project(':iceberg-core') + api project(':iceberg-data') + implementation project(':iceberg-orc') + implementation project(':iceberg-parquet') + implementation project(':iceberg-hive-metastore') + implementation project(":iceberg-flink") + + compileOnly "org.apache.flink:flink-streaming-java_2.12:${flinkVersion}" + compileOnly "org.apache.flink:flink-streaming-java_2.12:${flinkVersion}:tests" + compileOnly "org.apache.flink:flink-table-api-java-bridge_2.12:${flinkVersion}" + compileOnly "org.apache.flink:flink-table-planner-blink_2.12:${flinkVersion}" + compileOnly "org.apache.flink:flink-table-planner_2.12:${flinkVersion}" + compileOnly "org.apache.hadoop:hadoop-hdfs" + compileOnly "org.apache.hadoop:hadoop-common" + compileOnly("org.apache.hadoop:hadoop-minicluster") { + exclude group: 'org.apache.avro', module: 'avro' + } + + implementation("org.apache.parquet:parquet-avro") { + exclude group: 'org.apache.avro', module: 'avro' + // already shaded by Parquet + exclude group: 'it.unimi.dsi' + exclude group: 'org.codehaus.jackson' + } + + compileOnly "org.apache.avro:avro" + + implementation("org.apache.orc:orc-core::nohive") { + exclude group: 'org.apache.hadoop' + exclude group: 'commons-lang' + // These artifacts are shaded and included in the orc-core fat jar + exclude group: 'com.google.protobuf', module: 'protobuf-java' + exclude group: 'org.apache.hive', module: 'hive-storage-api' + } + + testImplementation "org.apache.flink:flink-core:${flinkVersion}" + testImplementation "org.apache.flink:flink-runtime_2.12:${flinkVersion}" + testImplementation "org.apache.flink:flink-table-planner-blink_2.12:${flinkVersion}" + testImplementation ("org.apache.flink:flink-test-utils-junit:${flinkVersion}") { + exclude group: 'junit' + } + testImplementation("org.apache.flink:flink-test-utils_2.12:${flinkVersion}") { + exclude group: "org.apache.curator", module: 'curator-test' + exclude group: 'junit' + } + + testImplementation project(path: ':iceberg-hive-metastore', configuration: 'testArtifacts') + testImplementation project(path: ':iceberg-api', configuration: 'testArtifacts') + testImplementation project(path: ':iceberg-core', configuration: 'testArtifacts') + testImplementation project(path: ':iceberg-data', configuration: 'testArtifacts') + + // By default, hive-exec is a fat/uber jar and it exports a guava library + // that's really old. We use the core classifier to be able to override our guava + // version. Luckily, hive-exec seems to work okay so far with this version of guava + // See: https://github.com/apache/hive/blob/master/ql/pom.xml#L911 for more context. + testImplementation("org.apache.hive:hive-exec::core") { + exclude group: 'org.apache.avro', module: 'avro' + exclude group: 'org.slf4j', module: 'slf4j-log4j12' + exclude group: 'org.pentaho' // missing dependency + exclude group: 'org.apache.hive', module: 'hive-llap-tez' + exclude group: 'org.apache.logging.log4j' + exclude group: 'com.google.protobuf', module: 'protobuf-java' + exclude group: 'org.apache.calcite' + exclude group: 'org.apache.calcite.avatica' + exclude group: 'com.google.code.findbugs', module: 'jsr305' + } + + testImplementation("org.apache.hive:hive-metastore") { + exclude group: 'org.apache.avro', module: 'avro' + exclude group: 'org.slf4j', module: 'slf4j-log4j12' + exclude group: 'org.pentaho' // missing dependency + exclude group: 'org.apache.hbase' + exclude group: 'org.apache.logging.log4j' + exclude group: 'co.cask.tephra' + exclude group: 'com.google.code.findbugs', module: 'jsr305' + exclude group: 'org.eclipse.jetty.aggregate', module: 'jetty-all' + exclude group: 'org.eclipse.jetty.orbit', module: 'javax.servlet' + exclude group: 'org.apache.parquet', module: 'parquet-hadoop-bundle' + exclude group: 'com.tdunning', module: 'json' + exclude group: 'javax.transaction', module: 'transaction-api' + exclude group: 'com.zaxxer', module: 'HikariCP' + } + } +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index d7ed4a2adf3e..bfa125487540 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,8 +15,8 @@ jmhOutputPath=build/reports/jmh/human-readable-output.txt jmhIncludeRegex=.* -systemProp.defaultFlinkVersions=1.13 -systemProp.knownFlinkVersions=1.13 +systemProp.defaultFlinkVersions=1.12,1.13 +systemProp.knownFlinkVersions=1.12,1.13 systemProp.defaultHiveVersions=2,3 systemProp.knownHiveVersions=2,3 systemProp.defaultSparkVersions=2.4,3.0,3.2 diff --git a/settings.gradle b/settings.gradle index 267a0b98f6c8..d4ce3483d124 100644 --- a/settings.gradle +++ b/settings.gradle @@ -28,6 +28,7 @@ include 'orc' include 'arrow' include 'parquet' include 'bundled-guava' +include 'flink' include 'spark' include 'pig' include 'hive-metastore' @@ -43,6 +44,7 @@ project(':orc').name = 'iceberg-orc' project(':arrow').name = 'iceberg-arrow' project(':parquet').name = 'iceberg-parquet' project(':bundled-guava').name = 'iceberg-bundled-guava' +project(':flink').name = 'iceberg-flink' project(':spark').name = 'iceberg-spark' project(':pig').name = 'iceberg-pig' project(':hive-metastore').name = 'iceberg-hive-metastore' @@ -72,11 +74,18 @@ if (!knownSparkVersions.containsAll(sparkVersions)) { throw new GradleException("Found unsupported Spark versions: " + (sparkVersions - knownSparkVersions)) } +if (flinkVersions.contains("1.12")) { + // TODO include 'flink-runtime' + include ':iceberg-flink:flink-1.12' + project(':iceberg-flink:flink-1.12').projectDir = file('flink/v1.12') + project(':iceberg-flink:flink-1.12').name = 'iceberg-flink-1.12' +} + if (flinkVersions.contains("1.13")) { - include 'flink' - include 'flink-runtime' - project(':flink').name = 'iceberg-flink' - project(':flink-runtime').name = 'iceberg-flink-runtime' + // TODO include 'flink-runtime' + include ':iceberg-flink:flink-1.13' + project(':iceberg-flink:flink-1.13').projectDir = file('flink/v1.13') + project(':iceberg-flink:flink-1.13').name = 'iceberg-flink-1.13' } if (sparkVersions.contains("3.0")) { From 43dc6cd69bd59fc17c406a63d191549babb649da Mon Sep 17 00:00:00 2001 From: huzheng Date: Wed, 27 Oct 2021 14:56:24 +0800 Subject: [PATCH 04/11] Temp --- flink/v1.12/build.gradle | 92 ---------------------- flink/v1.12/src/main/java/IcebergMain.java | 25 ++++++ 2 files changed, 25 insertions(+), 92 deletions(-) create mode 100644 flink/v1.12/src/main/java/IcebergMain.java diff --git a/flink/v1.12/build.gradle b/flink/v1.12/build.gradle index 5ee2715aa2f5..77ac88606c30 100644 --- a/flink/v1.12/build.gradle +++ b/flink/v1.12/build.gradle @@ -29,101 +29,9 @@ configure(flinkProjects) { } project(':iceberg-flink:iceberg-flink-1.12') { - apply plugin: 'scala' - - sourceSets { - main { - java.srcDirs = ["src/main/java"] - resources.srcDirs = ["src/main/resources"] - } - } dependencies { - implementation project(path: ':iceberg-bundled-guava', configuration: 'shadow') - api project(':iceberg-api') - implementation project(':iceberg-common') - implementation project(':iceberg-core') - api project(':iceberg-data') - implementation project(':iceberg-orc') - implementation project(':iceberg-parquet') - implementation project(':iceberg-hive-metastore') implementation project(":iceberg-flink") - - compileOnly "org.apache.flink:flink-streaming-java_2.12:${flinkVersion}" - compileOnly "org.apache.flink:flink-streaming-java_2.12:${flinkVersion}:tests" - compileOnly "org.apache.flink:flink-table-api-java-bridge_2.12:${flinkVersion}" - compileOnly "org.apache.flink:flink-table-planner-blink_2.12:${flinkVersion}" - compileOnly "org.apache.flink:flink-table-planner_2.12:${flinkVersion}" - compileOnly "org.apache.hadoop:hadoop-hdfs" - compileOnly "org.apache.hadoop:hadoop-common" - compileOnly("org.apache.hadoop:hadoop-minicluster") { - exclude group: 'org.apache.avro', module: 'avro' - } - - implementation("org.apache.parquet:parquet-avro") { - exclude group: 'org.apache.avro', module: 'avro' - // already shaded by Parquet - exclude group: 'it.unimi.dsi' - exclude group: 'org.codehaus.jackson' - } - - compileOnly "org.apache.avro:avro" - - implementation("org.apache.orc:orc-core::nohive") { - exclude group: 'org.apache.hadoop' - exclude group: 'commons-lang' - // These artifacts are shaded and included in the orc-core fat jar - exclude group: 'com.google.protobuf', module: 'protobuf-java' - exclude group: 'org.apache.hive', module: 'hive-storage-api' - } - - testImplementation "org.apache.flink:flink-core:${flinkVersion}" - testImplementation "org.apache.flink:flink-runtime_2.12:${flinkVersion}" - testImplementation "org.apache.flink:flink-table-planner-blink_2.12:${flinkVersion}" - testImplementation ("org.apache.flink:flink-test-utils-junit:${flinkVersion}") { - exclude group: 'junit' - } - testImplementation("org.apache.flink:flink-test-utils_2.12:${flinkVersion}") { - exclude group: "org.apache.curator", module: 'curator-test' - exclude group: 'junit' - } - - testImplementation project(path: ':iceberg-hive-metastore', configuration: 'testArtifacts') - testImplementation project(path: ':iceberg-api', configuration: 'testArtifacts') - testImplementation project(path: ':iceberg-core', configuration: 'testArtifacts') - testImplementation project(path: ':iceberg-data', configuration: 'testArtifacts') - - // By default, hive-exec is a fat/uber jar and it exports a guava library - // that's really old. We use the core classifier to be able to override our guava - // version. Luckily, hive-exec seems to work okay so far with this version of guava - // See: https://github.com/apache/hive/blob/master/ql/pom.xml#L911 for more context. - testImplementation("org.apache.hive:hive-exec::core") { - exclude group: 'org.apache.avro', module: 'avro' - exclude group: 'org.slf4j', module: 'slf4j-log4j12' - exclude group: 'org.pentaho' // missing dependency - exclude group: 'org.apache.hive', module: 'hive-llap-tez' - exclude group: 'org.apache.logging.log4j' - exclude group: 'com.google.protobuf', module: 'protobuf-java' - exclude group: 'org.apache.calcite' - exclude group: 'org.apache.calcite.avatica' - exclude group: 'com.google.code.findbugs', module: 'jsr305' - } - - testImplementation("org.apache.hive:hive-metastore") { - exclude group: 'org.apache.avro', module: 'avro' - exclude group: 'org.slf4j', module: 'slf4j-log4j12' - exclude group: 'org.pentaho' // missing dependency - exclude group: 'org.apache.hbase' - exclude group: 'org.apache.logging.log4j' - exclude group: 'co.cask.tephra' - exclude group: 'com.google.code.findbugs', module: 'jsr305' - exclude group: 'org.eclipse.jetty.aggregate', module: 'jetty-all' - exclude group: 'org.eclipse.jetty.orbit', module: 'javax.servlet' - exclude group: 'org.apache.parquet', module: 'parquet-hadoop-bundle' - exclude group: 'com.tdunning', module: 'json' - exclude group: 'javax.transaction', module: 'transaction-api' - exclude group: 'com.zaxxer', module: 'HikariCP' - } } } diff --git a/flink/v1.12/src/main/java/IcebergMain.java b/flink/v1.12/src/main/java/IcebergMain.java new file mode 100644 index 000000000000..3e0636e419cf --- /dev/null +++ b/flink/v1.12/src/main/java/IcebergMain.java @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import org.apache.iceberg.flink.FlinkSchemaUtil; + + +public class IcebergMain { + private static final Class UTIL = FlinkSchemaUtil.class; +} From 776aae3b9453bedaeaef2fe66ba5dfe3d2cd9a71 Mon Sep 17 00:00:00 2001 From: huzheng Date: Sat, 30 Oct 2021 11:49:35 +0800 Subject: [PATCH 05/11] Basic Build --- flink/build.gradle | 5 +- flink/v1.12/build.gradle | 101 ++++++++++++++++++++++++++++++++++++++- flink/v1.13/build.gradle | 10 +++- settings.gradle | 4 +- 4 files changed, 111 insertions(+), 9 deletions(-) diff --git a/flink/build.gradle b/flink/build.gradle index f739bfc00f1a..bbf65177bc3f 100644 --- a/flink/build.gradle +++ b/flink/build.gradle @@ -59,7 +59,7 @@ project(':iceberg-flink') { testImplementation "org.apache.flink:flink-core" testImplementation "org.apache.flink:flink-runtime_2.12" testImplementation "org.apache.flink:flink-table-planner-blink_2.12" - testImplementation ("org.apache.flink:flink-test-utils-junit") { + testImplementation("org.apache.flink:flink-test-utils-junit") { exclude group: 'junit' } testImplementation("org.apache.flink:flink-test-utils_2.12") { @@ -114,5 +114,4 @@ if (flinkVersions.contains("1.12")) { if (flinkVersions.contains("1.13")) { apply from: file("$projectDir/v1.13/build.gradle") -} - +} \ No newline at end of file diff --git a/flink/v1.12/build.gradle b/flink/v1.12/build.gradle index 77ac88606c30..30886ff74394 100644 --- a/flink/v1.12/build.gradle +++ b/flink/v1.12/build.gradle @@ -18,8 +18,8 @@ */ def flinkProjects = [ - project(':iceberg-flink:iceberg-flink-1.12'), - // TODO project(':iceberg-flink-1.12-runtime') + project(':iceberg-flink:iceberg-flink-1.12'), + // TODO project(':iceberg-flink-1.12-runtime') ] configure(flinkProjects) { @@ -30,8 +30,105 @@ configure(flinkProjects) { project(':iceberg-flink:iceberg-flink-1.12') { + sourceSets { + main { + java.srcDirs = [ + "${project(':iceberg-flink').projectDir}/common/src/main/java", + "src/main/java" + ] + resources.srcDirs = [ + "${project(':iceberg-flink').projectDir}/common/src/main/resources", + "src/main/resources" + ] + } + } + dependencies { + implementation project(path: ':iceberg-bundled-guava', configuration: 'shadow') + api project(':iceberg-api') + implementation project(':iceberg-common') + implementation project(':iceberg-core') + api project(':iceberg-data') + implementation project(':iceberg-orc') + implementation project(':iceberg-parquet') + implementation project(':iceberg-hive-metastore') implementation project(":iceberg-flink") + + compileOnly "org.apache.flink:flink-streaming-java_2.12:${flinkVersion}" + compileOnly "org.apache.flink:flink-streaming-java_2.12:${flinkVersion}:tests" + compileOnly "org.apache.flink:flink-table-api-java-bridge_2.12:${flinkVersion}" + compileOnly "org.apache.flink:flink-table-planner-blink_2.12:${flinkVersion}" + compileOnly "org.apache.flink:flink-table-planner_2.12:${flinkVersion}" + compileOnly "org.apache.hadoop:hadoop-hdfs" + compileOnly "org.apache.hadoop:hadoop-common" + compileOnly("org.apache.hadoop:hadoop-minicluster") { + exclude group: 'org.apache.avro', module: 'avro' + } + + implementation("org.apache.parquet:parquet-avro") { + exclude group: 'org.apache.avro', module: 'avro' + // already shaded by Parquet + exclude group: 'it.unimi.dsi' + exclude group: 'org.codehaus.jackson' + } + + compileOnly "org.apache.avro:avro" + + implementation("org.apache.orc:orc-core::nohive") { + exclude group: 'org.apache.hadoop' + exclude group: 'commons-lang' + // These artifacts are shaded and included in the orc-core fat jar + exclude group: 'com.google.protobuf', module: 'protobuf-java' + exclude group: 'org.apache.hive', module: 'hive-storage-api' + } + + testImplementation "org.apache.flink:flink-core:${flinkVersion}" + testImplementation "org.apache.flink:flink-runtime_2.12:${flinkVersion}" + testImplementation "org.apache.flink:flink-table-planner-blink_2.12:${flinkVersion}" + testImplementation("org.apache.flink:flink-test-utils-junit:${flinkVersion}") { + exclude group: 'junit' + } + testImplementation("org.apache.flink:flink-test-utils_2.12:${flinkVersion}") { + exclude group: "org.apache.curator", module: 'curator-test' + exclude group: 'junit' + } + + testImplementation project(path: ':iceberg-hive-metastore', configuration: 'testArtifacts') + testImplementation project(path: ':iceberg-api', configuration: 'testArtifacts') + testImplementation project(path: ':iceberg-core', configuration: 'testArtifacts') + testImplementation project(path: ':iceberg-data', configuration: 'testArtifacts') + + // By default, hive-exec is a fat/uber jar and it exports a guava library + // that's really old. We use the core classifier to be able to override our guava + // version. Luckily, hive-exec seems to work okay so far with this version of guava + // See: https://github.com/apache/hive/blob/master/ql/pom.xml#L911 for more context. + testImplementation("org.apache.hive:hive-exec::core") { + exclude group: 'org.apache.avro', module: 'avro' + exclude group: 'org.slf4j', module: 'slf4j-log4j12' + exclude group: 'org.pentaho' // missing dependency + exclude group: 'org.apache.hive', module: 'hive-llap-tez' + exclude group: 'org.apache.logging.log4j' + exclude group: 'com.google.protobuf', module: 'protobuf-java' + exclude group: 'org.apache.calcite' + exclude group: 'org.apache.calcite.avatica' + exclude group: 'com.google.code.findbugs', module: 'jsr305' + } + + testImplementation("org.apache.hive:hive-metastore") { + exclude group: 'org.apache.avro', module: 'avro' + exclude group: 'org.slf4j', module: 'slf4j-log4j12' + exclude group: 'org.pentaho' // missing dependency + exclude group: 'org.apache.hbase' + exclude group: 'org.apache.logging.log4j' + exclude group: 'co.cask.tephra' + exclude group: 'com.google.code.findbugs', module: 'jsr305' + exclude group: 'org.eclipse.jetty.aggregate', module: 'jetty-all' + exclude group: 'org.eclipse.jetty.orbit', module: 'javax.servlet' + exclude group: 'org.apache.parquet', module: 'parquet-hadoop-bundle' + exclude group: 'com.tdunning', module: 'json' + exclude group: 'javax.transaction', module: 'transaction-api' + exclude group: 'com.zaxxer', module: 'HikariCP' + } } } diff --git a/flink/v1.13/build.gradle b/flink/v1.13/build.gradle index 94cc2911d7f5..ab1308f24703 100644 --- a/flink/v1.13/build.gradle +++ b/flink/v1.13/build.gradle @@ -33,8 +33,14 @@ project(':iceberg-flink:iceberg-flink-1.13') { sourceSets { main { - java.srcDirs = ["src/main/java"] - resources.srcDirs = ["src/main/resources"] + java.srcDirs = [ + "${project(':iceberg-flink').projectDir}/src/main/java", + "src/main/java" + ] + resources.srcDirs = [ + "${project(':iceberg-flink').projectDir}/src/main/resources", + "src/main/resources" + ] } } diff --git a/settings.gradle b/settings.gradle index d4ce3483d124..06eefb19fcfb 100644 --- a/settings.gradle +++ b/settings.gradle @@ -77,14 +77,14 @@ if (!knownSparkVersions.containsAll(sparkVersions)) { if (flinkVersions.contains("1.12")) { // TODO include 'flink-runtime' include ':iceberg-flink:flink-1.12' - project(':iceberg-flink:flink-1.12').projectDir = file('flink/v1.12') + project(':iceberg-flink:flink-1.12').projectDir = file('flink/v1.12/flink') project(':iceberg-flink:flink-1.12').name = 'iceberg-flink-1.12' } if (flinkVersions.contains("1.13")) { // TODO include 'flink-runtime' include ':iceberg-flink:flink-1.13' - project(':iceberg-flink:flink-1.13').projectDir = file('flink/v1.13') + project(':iceberg-flink:flink-1.13').projectDir = file('flink/v1.13/flink') project(':iceberg-flink:flink-1.13').name = 'iceberg-flink-1.13' } From ef86459c8338c5fb9580fc0df1432d76bd99d238 Mon Sep 17 00:00:00 2001 From: huzheng Date: Sat, 30 Oct 2021 12:07:31 +0800 Subject: [PATCH 06/11] Add iceberg-flink-runtime --- flink-runtime/build.gradle | 77 --- flink/v1.12/build.gradle | 65 ++- .../v1.12/flink-runtime}/LICENSE | 0 .../v1.12/flink-runtime}/NOTICE | 0 flink/v1.12/src/main/java/IcebergMain.java | 25 - flink/v1.13/build.gradle | 61 ++- flink/v1.13/flink-runtime/LICENSE | 484 ++++++++++++++++++ flink/v1.13/flink-runtime/NOTICE | 91 ++++ settings.gradle | 8 +- 9 files changed, 701 insertions(+), 110 deletions(-) delete mode 100644 flink-runtime/build.gradle rename {flink-runtime => flink/v1.12/flink-runtime}/LICENSE (100%) rename {flink-runtime => flink/v1.12/flink-runtime}/NOTICE (100%) delete mode 100644 flink/v1.12/src/main/java/IcebergMain.java create mode 100644 flink/v1.13/flink-runtime/LICENSE create mode 100644 flink/v1.13/flink-runtime/NOTICE diff --git a/flink-runtime/build.gradle b/flink-runtime/build.gradle deleted file mode 100644 index 92c435036601..000000000000 --- a/flink-runtime/build.gradle +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -project(':iceberg-flink-runtime') { - apply plugin: 'com.github.johnrengelman.shadow' - - tasks.jar.dependsOn tasks.shadowJar - - configurations { - implementation { - exclude group: 'org.apache.flink' - // included in Flink - exclude group: 'org.slf4j' - exclude group: 'org.apache.commons' - exclude group: 'commons-pool' - exclude group: 'commons-codec' - exclude group: 'org.xerial.snappy' - exclude group: 'javax.xml.bind' - exclude group: 'javax.annotation' - } - } - - dependencies { - implementation project(':iceberg-flink') - implementation project(':iceberg-aws') - implementation(project(':iceberg-nessie')) { - exclude group: 'com.google.code.findbugs', module: 'jsr305' - } - } - - shadowJar { - configurations = [project.configurations.runtimeClasspath] - - zip64 true - - // include the LICENSE and NOTICE files for the shaded Jar - from(projectDir) { - include 'LICENSE' - include 'NOTICE' - } - - // Relocate dependencies to avoid conflicts - relocate 'org.apache.avro', 'org.apache.iceberg.shaded.org.apache.avro' - relocate 'org.apache.parquet', 'org.apache.iceberg.shaded.org.apache.parquet' - relocate 'com.google', 'org.apache.iceberg.shaded.com.google' - relocate 'com.fasterxml', 'org.apache.iceberg.shaded.com.fasterxml' - relocate 'com.github.benmanes', 'org.apache.iceberg.shaded.com.github.benmanes' - relocate 'org.checkerframework', 'org.apache.iceberg.shaded.org.checkerframework' - relocate 'shaded.parquet', 'org.apache.iceberg.shaded.org.apache.parquet.shaded' - relocate 'org.apache.orc', 'org.apache.iceberg.shaded.org.apache.orc' - relocate 'io.airlift', 'org.apache.iceberg.shaded.io.airlift' - relocate 'org.threeten.extra', 'org.apache.iceberg.shaded.org.threeten.extra' - - classifier null - } - - jar { - enabled = false - } -} - diff --git a/flink/v1.12/build.gradle b/flink/v1.12/build.gradle index 30886ff74394..46cefa844ca7 100644 --- a/flink/v1.12/build.gradle +++ b/flink/v1.12/build.gradle @@ -19,7 +19,7 @@ def flinkProjects = [ project(':iceberg-flink:iceberg-flink-1.12'), - // TODO project(':iceberg-flink-1.12-runtime') + project(':iceberg-flink:iceberg-flink-1.12-runtime') ] configure(flinkProjects) { @@ -33,11 +33,11 @@ project(':iceberg-flink:iceberg-flink-1.12') { sourceSets { main { java.srcDirs = [ - "${project(':iceberg-flink').projectDir}/common/src/main/java", + "${project(':iceberg-flink').projectDir}/src/main/java", "src/main/java" ] resources.srcDirs = [ - "${project(':iceberg-flink').projectDir}/common/src/main/resources", + "${project(':iceberg-flink').projectDir}/src/main/resources", "src/main/resources" ] } @@ -52,7 +52,6 @@ project(':iceberg-flink:iceberg-flink-1.12') { implementation project(':iceberg-orc') implementation project(':iceberg-parquet') implementation project(':iceberg-hive-metastore') - implementation project(":iceberg-flink") compileOnly "org.apache.flink:flink-streaming-java_2.12:${flinkVersion}" compileOnly "org.apache.flink:flink-streaming-java_2.12:${flinkVersion}:tests" @@ -132,3 +131,61 @@ project(':iceberg-flink:iceberg-flink-1.12') { } } +project(':iceberg-flink:iceberg-flink-1.12-runtime') { + apply plugin: 'com.github.johnrengelman.shadow' + + tasks.jar.dependsOn tasks.shadowJar + + configurations { + implementation { + exclude group: 'org.apache.flink' + // included in Flink + exclude group: 'org.slf4j' + exclude group: 'org.apache.commons' + exclude group: 'commons-pool' + exclude group: 'commons-codec' + exclude group: 'org.xerial.snappy' + exclude group: 'javax.xml.bind' + exclude group: 'javax.annotation' + } + } + + dependencies { + implementation project(':iceberg-flink:iceberg-flink-1.12') + implementation project(':iceberg-aws') + implementation(project(':iceberg-nessie')) { + exclude group: 'com.google.code.findbugs', module: 'jsr305' + } + } + + shadowJar { + configurations = [project.configurations.runtimeClasspath] + + zip64 true + + // include the LICENSE and NOTICE files for the shaded Jar + from(projectDir) { + include 'LICENSE' + include 'NOTICE' + } + + // Relocate dependencies to avoid conflicts + relocate 'org.apache.avro', 'org.apache.iceberg.shaded.org.apache.avro' + relocate 'org.apache.parquet', 'org.apache.iceberg.shaded.org.apache.parquet' + relocate 'com.google', 'org.apache.iceberg.shaded.com.google' + relocate 'com.fasterxml', 'org.apache.iceberg.shaded.com.fasterxml' + relocate 'com.github.benmanes', 'org.apache.iceberg.shaded.com.github.benmanes' + relocate 'org.checkerframework', 'org.apache.iceberg.shaded.org.checkerframework' + relocate 'shaded.parquet', 'org.apache.iceberg.shaded.org.apache.parquet.shaded' + relocate 'org.apache.orc', 'org.apache.iceberg.shaded.org.apache.orc' + relocate 'io.airlift', 'org.apache.iceberg.shaded.io.airlift' + relocate 'org.threeten.extra', 'org.apache.iceberg.shaded.org.threeten.extra' + + classifier null + } + + jar { + enabled = false + } +} + diff --git a/flink-runtime/LICENSE b/flink/v1.12/flink-runtime/LICENSE similarity index 100% rename from flink-runtime/LICENSE rename to flink/v1.12/flink-runtime/LICENSE diff --git a/flink-runtime/NOTICE b/flink/v1.12/flink-runtime/NOTICE similarity index 100% rename from flink-runtime/NOTICE rename to flink/v1.12/flink-runtime/NOTICE diff --git a/flink/v1.12/src/main/java/IcebergMain.java b/flink/v1.12/src/main/java/IcebergMain.java deleted file mode 100644 index 3e0636e419cf..000000000000 --- a/flink/v1.12/src/main/java/IcebergMain.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import org.apache.iceberg.flink.FlinkSchemaUtil; - - -public class IcebergMain { - private static final Class UTIL = FlinkSchemaUtil.class; -} diff --git a/flink/v1.13/build.gradle b/flink/v1.13/build.gradle index ab1308f24703..24ae0576a0a9 100644 --- a/flink/v1.13/build.gradle +++ b/flink/v1.13/build.gradle @@ -19,7 +19,7 @@ def flinkProjects = [ project(':iceberg-flink:iceberg-flink-1.13'), - // project(':iceberg-flink-1.13-runtime') + project(':iceberg-flink:iceberg-flink-1.13-runtime') ] configure(flinkProjects) { @@ -53,7 +53,6 @@ project(':iceberg-flink:iceberg-flink-1.13') { implementation project(':iceberg-orc') implementation project(':iceberg-parquet') implementation project(':iceberg-hive-metastore') - implementation project(":iceberg-flink") compileOnly "org.apache.flink:flink-streaming-java_2.12:${flinkVersion}" compileOnly "org.apache.flink:flink-streaming-java_2.12:${flinkVersion}:tests" @@ -131,4 +130,62 @@ project(':iceberg-flink:iceberg-flink-1.13') { exclude group: 'com.zaxxer', module: 'HikariCP' } } +} + +project(':iceberg-flink:iceberg-flink-1.13-runtime') { + apply plugin: 'com.github.johnrengelman.shadow' + + tasks.jar.dependsOn tasks.shadowJar + + configurations { + implementation { + exclude group: 'org.apache.flink' + // included in Flink + exclude group: 'org.slf4j' + exclude group: 'org.apache.commons' + exclude group: 'commons-pool' + exclude group: 'commons-codec' + exclude group: 'org.xerial.snappy' + exclude group: 'javax.xml.bind' + exclude group: 'javax.annotation' + } + } + + dependencies { + implementation project(':iceberg-flink:iceberg-flink-1.13') + implementation project(':iceberg-aws') + implementation(project(':iceberg-nessie')) { + exclude group: 'com.google.code.findbugs', module: 'jsr305' + } + } + + shadowJar { + configurations = [project.configurations.runtimeClasspath] + + zip64 true + + // include the LICENSE and NOTICE files for the shaded Jar + from(projectDir) { + include 'LICENSE' + include 'NOTICE' + } + + // Relocate dependencies to avoid conflicts + relocate 'org.apache.avro', 'org.apache.iceberg.shaded.org.apache.avro' + relocate 'org.apache.parquet', 'org.apache.iceberg.shaded.org.apache.parquet' + relocate 'com.google', 'org.apache.iceberg.shaded.com.google' + relocate 'com.fasterxml', 'org.apache.iceberg.shaded.com.fasterxml' + relocate 'com.github.benmanes', 'org.apache.iceberg.shaded.com.github.benmanes' + relocate 'org.checkerframework', 'org.apache.iceberg.shaded.org.checkerframework' + relocate 'shaded.parquet', 'org.apache.iceberg.shaded.org.apache.parquet.shaded' + relocate 'org.apache.orc', 'org.apache.iceberg.shaded.org.apache.orc' + relocate 'io.airlift', 'org.apache.iceberg.shaded.io.airlift' + relocate 'org.threeten.extra', 'org.apache.iceberg.shaded.org.threeten.extra' + + classifier null + } + + jar { + enabled = false + } } \ No newline at end of file diff --git a/flink/v1.13/flink-runtime/LICENSE b/flink/v1.13/flink-runtime/LICENSE new file mode 100644 index 000000000000..63df9061dff1 --- /dev/null +++ b/flink/v1.13/flink-runtime/LICENSE @@ -0,0 +1,484 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +-------------------------------------------------------------------------------- + +This binary artifact contains Apache Avro. + +Copyright: 2014-2020 The Apache Software Foundation. +Home page: https://parquet.apache.org/ +License: http://www.apache.org/licenses/LICENSE-2.0 + +-------------------------------------------------------------------------------- + +This binary artifact contains the Jackson JSON processor. + +Copyright: 2007-2020 Tatu Saloranta and other contributors +Home page: http://jackson.codehaus.org/ +License: http://www.apache.org/licenses/LICENSE-2.0.txt + +-------------------------------------------------------------------------------- + +This binary artifact contains Apache Parquet. + +Copyright: 2014-2020 The Apache Software Foundation. +Home page: https://parquet.apache.org/ +License: http://www.apache.org/licenses/LICENSE-2.0 + +-------------------------------------------------------------------------------- + +This binary artifact contains Apache Thrift. + +Copyright: 2006-2010 The Apache Software Foundation. +Home page: https://thrift.apache.org/ +License: http://www.apache.org/licenses/LICENSE-2.0 + +-------------------------------------------------------------------------------- + +This binary artifact contains fastutil. + +Copyright: 2002-2014 Sebastiano Vigna +Home page: http://fastutil.di.unimi.it/ +License: http://www.apache.org/licenses/LICENSE-2.0.html + +-------------------------------------------------------------------------------- + +This binary artifact contains Apache ORC. + +Copyright: 2013-2020 The Apache Software Foundation. +Home page: https://orc.apache.org/ +License: http://www.apache.org/licenses/LICENSE-2.0 + +-------------------------------------------------------------------------------- + +This binary artifact contains Apache Hive's storage API via ORC. + +Copyright: 2013-2020 The Apache Software Foundation. +Home page: https://hive.apache.org/ +License: http://www.apache.org/licenses/LICENSE-2.0 + +-------------------------------------------------------------------------------- + +This binary artifact contains Airlift Aircompressor. + +Copyright: 2011-2020 Aircompressor authors. +Home page: https://github.com/airlift/aircompressor +License: http://www.apache.org/licenses/LICENSE-2.0 + +-------------------------------------------------------------------------------- + +This binary artifact contains Airlift Slice. + +Copyright: 2013-2020 Slice authors. +Home page: https://github.com/airlift/slice +License: http://www.apache.org/licenses/LICENSE-2.0 + +-------------------------------------------------------------------------------- + +This binary artifact contains JetBrains annotations. + +Copyright: 2000-2020 JetBrains s.r.o. +Home page: https://github.com/JetBrains/java-annotations +License: http://www.apache.org/licenses/LICENSE-2.0 + +-------------------------------------------------------------------------------- + +This binary artifact contains Google Guava. + +Copyright: 2006-2020 The Guava Authors +Home page: https://github.com/google/guava +License: http://www.apache.org/licenses/LICENSE-2.0 + +-------------------------------------------------------------------------------- + +This binary artifact contains Google Error Prone Annotations. + +Copyright: Copyright 2011-2019 The Error Prone Authors +Home page: https://github.com/google/error-prone +License: http://www.apache.org/licenses/LICENSE-2.0 + +-------------------------------------------------------------------------------- + +This binary artifact contains checkerframework checker-qual Annotations. + +Copyright: 2004-2020 the Checker Framework developers +Home page: https://github.com/typetools/checker-framework +License: https://github.com/typetools/checker-framework/blob/master/LICENSE.txt (MIT license) + +License text: +| The annotations are licensed under the MIT License. (The text of this +| license appears below.) More specifically, all the parts of the Checker +| Framework that you might want to include with your own program use the +| MIT License. This is the checker-qual.jar file and all the files that +| appear in it: every file in a qual/ directory, plus utility files such +| as NullnessUtil.java, RegexUtil.java, SignednessUtil.java, etc. +| In addition, the cleanroom implementations of third-party annotations, +| which the Checker Framework recognizes as aliases for its own +| annotations, are licensed under the MIT License. +| +| Permission is hereby granted, free of charge, to any person obtaining a copy +| of this software and associated documentation files (the "Software"), to deal +| in the Software without restriction, including without limitation the rights +| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +| copies of the Software, and to permit persons to whom the Software is +| furnished to do so, subject to the following conditions: +| +| The above copyright notice and this permission notice shall be included in +| all copies or substantial portions of the Software. +| +| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +| THE SOFTWARE. + +-------------------------------------------------------------------------------- + +This binary artifact contains Animal Sniffer Annotations. + +Copyright: 2009-2018 codehaus.org +Home page: https://www.mojohaus.org/animal-sniffer/animal-sniffer-annotations/ +License: https://www.mojohaus.org/animal-sniffer/animal-sniffer-annotations/license.html (MIT license) + +License text: +| The MIT License +| +| Copyright (c) 2009 codehaus.org. +| +| Permission is hereby granted, free of charge, to any person obtaining a copy +| of this software and associated documentation files (the "Software"), to deal +| in the Software without restriction, including without limitation the rights +| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +| copies of the Software, and to permit persons to whom the Software is +| furnished to do so, subject to the following conditions: +| +| The above copyright notice and this permission notice shall be included in +| all copies or substantial portions of the Software. +| +| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +| THE SOFTWARE. + +-------------------------------------------------------------------------------- + +This binary artifact contains Caffeine by Ben Manes. + +Copyright: 2014-2020 Ben Manes and contributors +Home page: https://github.com/ben-manes/caffeine +License: http://www.apache.org/licenses/LICENSE-2.0 + +-------------------------------------------------------------------------------- + +This binary artifact contains Apache Yetus audience annotations. + +Copyright: 2008-2020 The Apache Software Foundation. +Home page: https://yetus.apache.org/ +License: http://www.apache.org/licenses/LICENSE-2.0 + +-------------------------------------------------------------------------------- + +This binary artifact contains Google protobuf. + +Copyright: 2008 Google Inc. +Home page: https://developers.google.com/protocol-buffers +License: https://github.com/protocolbuffers/protobuf/blob/master/LICENSE (BSD) + +License text: + +| Copyright 2008 Google Inc. All rights reserved. +| +| Redistribution and use in source and binary forms, with or without +| modification, are permitted provided that the following conditions are +| met: +| +| * Redistributions of source code must retain the above copyright +| notice, this list of conditions and the following disclaimer. +| * Redistributions in binary form must reproduce the above +| copyright notice, this list of conditions and the following disclaimer +| in the documentation and/or other materials provided with the +| distribution. +| * Neither the name of Google Inc. nor the names of its +| contributors may be used to endorse or promote products derived from +| this software without specific prior written permission. +| +| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +| (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +| OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +| +| Code generated by the Protocol Buffer compiler is owned by the owner +| of the input file used when generating it. This code is not +| standalone and requires a support library to be linked with it. This +| support library is itself covered by the above license. + +-------------------------------------------------------------------------------- + +This binary artifact contains ThreeTen. + +Copyright: 2007-present, Stephen Colebourne & Michael Nascimento Santos. +Home page: https://www.threeten.org/threeten-extra/ +License: https://github.com/ThreeTen/threeten-extra/blob/master/LICENSE.txt (BSD 3-clause) + +License text: + +| All rights reserved. +| +| * Redistribution and use in source and binary forms, with or without +| modification, are permitted provided that the following conditions are met: +| +| * Redistributions of source code must retain the above copyright notice, +| this list of conditions and the following disclaimer. +| +| * Redistributions in binary form must reproduce the above copyright notice, +| this list of conditions and the following disclaimer in the documentation +| and/or other materials provided with the distribution. +| +| * Neither the name of JSR-310 nor the names of its contributors +| may be used to endorse or promote products derived from this software +| without specific prior written permission. +| +| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +| CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +| EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +| PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +| PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +| LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +| NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +| SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-------------------------------------------------------------------------------- + +This binary artifact includes Project Nessie with the following in its NOTICE +file: + +| Dremio +| Copyright 2015-2017 Dremio Corporation +| +| This product includes software developed at +| The Apache Software Foundation (http://www.apache.org/). + +-------------------------------------------------------------------------------- + +This binary includes code from Apache Commons. + +* Core ArrayUtil. + +Copyright: 2020 The Apache Software Foundation +Home page: https://commons.apache.org/ +License: https://www.apache.org/licenses/LICENSE-2.0 diff --git a/flink/v1.13/flink-runtime/NOTICE b/flink/v1.13/flink-runtime/NOTICE new file mode 100644 index 000000000000..24a09ee00563 --- /dev/null +++ b/flink/v1.13/flink-runtime/NOTICE @@ -0,0 +1,91 @@ + +Apache Iceberg +Copyright 2017-2021 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). + +-------------------------------------------------------------------------------- + +This binary artifact includes Apache ORC with the following in its NOTICE file: + +| Apache ORC +| Copyright 2013-2019 The Apache Software Foundation +| +| This product includes software developed by The Apache Software +| Foundation (http://www.apache.org/). +| +| This product includes software developed by Hewlett-Packard: +| (c) Copyright [2014-2015] Hewlett-Packard Development Company, L.P + +-------------------------------------------------------------------------------- + +This binary artifact includes Airlift Aircompressor with the following in its +NOTICE file: + +| Snappy Copyright Notices +| ========================= +| +| * Copyright 2011 Dain Sundstrom +| * Copyright 2011, Google Inc. +| +| +| Snappy License +| =============== +| Copyright 2011, Google Inc. +| All rights reserved. +| +| Redistribution and use in source and binary forms, with or without +| modification, are permitted provided that the following conditions are +| met: +| +| * Redistributions of source code must retain the above copyright +| notice, this list of conditions and the following disclaimer. +| * Redistributions in binary form must reproduce the above +| copyright notice, this list of conditions and the following disclaimer +| in the documentation and/or other materials provided with the +| distribution. +| * Neither the name of Google Inc. nor the names of its +| contributors may be used to endorse or promote products derived from +| this software without specific prior written permission. +| +| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +| (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +| OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +-------------------------------------------------------------------------------- + +This binary artifact includes Apache Yetus with the following in its NOTICE +file: + +| Apache Yetus +| Copyright 2008-2020 The Apache Software Foundation +| +| This product includes software developed at +| The Apache Software Foundation (https://www.apache.org/). +| +| --- +| Additional licenses for the Apache Yetus Source/Website: +| --- +| +| +| See LICENSE for terms. + +-------------------------------------------------------------------------------- + +This binary artifact includes Project Nessie with the following in its NOTICE +file: + +| Dremio +| Copyright 2015-2017 Dremio Corporation +| +| This product includes software developed at +| The Apache Software Foundation (http://www.apache.org/). diff --git a/settings.gradle b/settings.gradle index 06eefb19fcfb..00923a72320b 100644 --- a/settings.gradle +++ b/settings.gradle @@ -75,17 +75,21 @@ if (!knownSparkVersions.containsAll(sparkVersions)) { } if (flinkVersions.contains("1.12")) { - // TODO include 'flink-runtime' include ':iceberg-flink:flink-1.12' + include ':iceberg-flink:flink-1.12-runtime' project(':iceberg-flink:flink-1.12').projectDir = file('flink/v1.12/flink') project(':iceberg-flink:flink-1.12').name = 'iceberg-flink-1.12' + project(':iceberg-flink:flink-1.12-runtime').projectDir = file('flink/v1.12/flink-runtime') + project(':iceberg-flink:flink-1.12-runtime').name = 'iceberg-flink-1.12-runtime' } if (flinkVersions.contains("1.13")) { - // TODO include 'flink-runtime' include ':iceberg-flink:flink-1.13' + include ':iceberg-flink:flink-1.13-runtime' project(':iceberg-flink:flink-1.13').projectDir = file('flink/v1.13/flink') project(':iceberg-flink:flink-1.13').name = 'iceberg-flink-1.13' + project(':iceberg-flink:flink-1.13-runtime').projectDir = file('flink/v1.13/flink-runtime') + project(':iceberg-flink:flink-1.13-runtime').name = 'iceberg-flink-1.13-runtime' } if (sparkVersions.contains("3.0")) { From 67e0e13ed0eaca9772ed6c7ad28b589d458baf1a Mon Sep 17 00:00:00 2001 From: huzheng Date: Sat, 30 Oct 2021 13:09:48 +0800 Subject: [PATCH 07/11] Address the CI issues --- .github/workflows/flink-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/flink-ci.yml b/.github/workflows/flink-ci.yml index cd8a16c0c4cb..2246ee8f0f85 100644 --- a/.github/workflows/flink-ci.yml +++ b/.github/workflows/flink-ci.yml @@ -54,7 +54,7 @@ jobs: strategy: matrix: jvm: [8, 11] - flink: ['1.13'] + flink: ['1.12', '1.13'] env: SPARK_LOCAL_IP: localhost steps: @@ -68,7 +68,7 @@ jobs: key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} restore-keys: ${{ runner.os }}-gradle - run: echo -e "$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)\t$(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts - - run: ./gradlew -DsparkVersions= -DhiveVersions= -DflinkVersions=${{ matrix.flink }} :iceberg-flink:check :iceberg-flink-runtime:check -Pquick=true -x javadoc + - run: ./gradlew -DsparkVersions= -DhiveVersions= -DflinkVersions=${{ matrix.flink }} :iceberg-flink:iceberg-flink-${{ matrix.flink }}:check :iceberg-flink-${{ matrix.flink }}-runtime:check -Pquick=true -x javadoc - uses: actions/upload-artifact@v2 if: failure() with: From b1ae5f1d178baf01e9ca1393534f620f0ab9f5cf Mon Sep 17 00:00:00 2001 From: huzheng Date: Sat, 30 Oct 2021 13:13:16 +0800 Subject: [PATCH 08/11] Addressing the CI --- .github/workflows/flink-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/flink-ci.yml b/.github/workflows/flink-ci.yml index 2246ee8f0f85..12e7ec883322 100644 --- a/.github/workflows/flink-ci.yml +++ b/.github/workflows/flink-ci.yml @@ -68,7 +68,7 @@ jobs: key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} restore-keys: ${{ runner.os }}-gradle - run: echo -e "$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)\t$(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts - - run: ./gradlew -DsparkVersions= -DhiveVersions= -DflinkVersions=${{ matrix.flink }} :iceberg-flink:iceberg-flink-${{ matrix.flink }}:check :iceberg-flink-${{ matrix.flink }}-runtime:check -Pquick=true -x javadoc + - run: ./gradlew -DsparkVersions= -DhiveVersions= -DflinkVersions=${{ matrix.flink }} :iceberg-flink:iceberg-flink-${{ matrix.flink }}:check :iceberg-flink:iceberg-flink-${{ matrix.flink }}-runtime:check -Pquick=true -x javadoc - uses: actions/upload-artifact@v2 if: failure() with: From 4a00f5671f9edbda6e2aae412c13b3da68179826 Mon Sep 17 00:00:00 2001 From: Ryan Blue Date: Sun, 31 Oct 2021 11:32:38 -0700 Subject: [PATCH 09/11] Remove unnecessary Scala plugin addition. --- flink/v1.13/build.gradle | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/flink/v1.13/build.gradle b/flink/v1.13/build.gradle index 24ae0576a0a9..b2c24d498a06 100644 --- a/flink/v1.13/build.gradle +++ b/flink/v1.13/build.gradle @@ -29,7 +29,6 @@ configure(flinkProjects) { } project(':iceberg-flink:iceberg-flink-1.13') { - apply plugin: 'scala' sourceSets { main { @@ -188,4 +187,4 @@ project(':iceberg-flink:iceberg-flink-1.13-runtime') { jar { enabled = false } -} \ No newline at end of file +} From 73b78147a264d8aaa620336545526ef99edf5730 Mon Sep 17 00:00:00 2001 From: Ryan Blue Date: Sun, 31 Oct 2021 11:42:37 -0700 Subject: [PATCH 10/11] Add Flink to the build if 1.12 or 1.13 is enabled. --- settings.gradle | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/settings.gradle b/settings.gradle index 00923a72320b..7eda4a30cd62 100644 --- a/settings.gradle +++ b/settings.gradle @@ -28,7 +28,6 @@ include 'orc' include 'arrow' include 'parquet' include 'bundled-guava' -include 'flink' include 'spark' include 'pig' include 'hive-metastore' @@ -44,7 +43,6 @@ project(':orc').name = 'iceberg-orc' project(':arrow').name = 'iceberg-arrow' project(':parquet').name = 'iceberg-parquet' project(':bundled-guava').name = 'iceberg-bundled-guava' -project(':flink').name = 'iceberg-flink' project(':spark').name = 'iceberg-spark' project(':pig').name = 'iceberg-pig' project(':hive-metastore').name = 'iceberg-hive-metastore' @@ -74,6 +72,11 @@ if (!knownSparkVersions.containsAll(sparkVersions)) { throw new GradleException("Found unsupported Spark versions: " + (sparkVersions - knownSparkVersions)) } +if (!flinkVersions.isEmpty()) { + include 'flink' + project(':flink').name = 'iceberg-flink' +} + if (flinkVersions.contains("1.12")) { include ':iceberg-flink:flink-1.12' include ':iceberg-flink:flink-1.12-runtime' From 17f27ce6e5417a4133dd86102b7b350e4041d834 Mon Sep 17 00:00:00 2001 From: Ryan Blue Date: Sun, 31 Oct 2021 11:44:28 -0700 Subject: [PATCH 11/11] Add iceberg-flink tests to Flink CI workflow --- .github/workflows/flink-ci.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/flink-ci.yml b/.github/workflows/flink-ci.yml index 12e7ec883322..35043c91c2f8 100644 --- a/.github/workflows/flink-ci.yml +++ b/.github/workflows/flink-ci.yml @@ -49,6 +49,32 @@ on: - 'site/**' jobs: + flink-common-tests: + runs-on: ubuntu-latest + strategy: + matrix: + jvm: [8, 11] + env: + SPARK_LOCAL_IP: localhost + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.jvm }} + - uses: actions/cache@v2 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} + restore-keys: ${{ runner.os }}-gradle + - run: echo -e "$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)\t$(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts + - run: ./gradlew -DsparkVersions= -DhiveVersions= :iceberg-flink:check -Pquick=true -x javadoc + - uses: actions/upload-artifact@v2 + if: failure() + with: + name: test logs + path: | + **/build/testlogs + flink-tests: runs-on: ubuntu-latest strategy: