Skip to content

Commit

Permalink
rdar://112325953: Add Rio pipeline to run iceberg unit tests for bran…
Browse files Browse the repository at this point in the history
…ch-3.4.0 (apache#1819)

* rdar://112325953: Add Rio pipeline to run iceberg unit tests for branch-3.4.0

* Comment some shadow-test

* For review

* Upgrade Iceberg version

Co-authored-by: Liang-Chi Hsieh <viirya@gmail.com>
  • Loading branch information
2 people authored and GitHub Enterprise committed Jul 18, 2023
1 parent 141f8b3 commit 2f432eb
Show file tree
Hide file tree
Showing 3 changed files with 294 additions and 0 deletions.
28 changes: 28 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2821,6 +2821,22 @@
<version>${iceberg.version}</version>
<scope>runtime</scope>
</dependency>

<!-- Run Iceberg unit tests -->
<dependency>
<groupId>org.apache.iceberg</groupId>
<artifactId>iceberg-spark-3.4_${scala.binary.version}</artifactId>
<version>${iceberg.version}</version>
<classifier>shadow-tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.iceberg</groupId>
<artifactId>iceberg-hive-metastore</artifactId>
<version>${iceberg.version}</version>
<classifier>shadow-tests</classifier>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down Expand Up @@ -3001,6 +3017,10 @@
<include>**/*TestCase.java</include>
<include>**/*Suite.java</include>
</includes>
<dependenciesToScan>
<dependency>org.apache.iceberg:iceberg-spark-3.4_${scala.binary.version}:jar:shadow-tests</dependency>
<dependency>org.apache.iceberg:iceberg-hive-metastore:jar:shadow-tests</dependency>
</dependenciesToScan>
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
<argLine>-ea -Xmx4g -Xss4m -XX:MaxMetaspaceSize=2g -XX:ReservedCodeCacheSize=${CodeCacheSize} ${extraJavaTestArgs} -Dio.netty.tryReflectionSetAccessible=true</argLine>
<environmentVariables>
Expand Down Expand Up @@ -3622,6 +3642,14 @@
</modules>
</profile>


<profile>
<id>iceberg</id>
<modules>
<module>sql/iceberg</module>
</modules>
</profile>

<profile>
<id>hadoop-cloud</id>
<modules>
Expand Down
59 changes: 59 additions & 0 deletions rio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,65 @@ builds:
- BOSON=false build/sbt -Dscala.version=2.13.8 -Pscala-2.13 -Phadoop-3 -Phive "hive/testOnly *.HiveCompatibilitySuite"
- BOSON=true build/sbt -Dscala.version=2.13.8 -Pscala-2.13 -Phadoop-3 -Phive "hive/testOnly *.HiveCompatibilitySuite"

# Uncomment once shadow-test jar removes Parquet shading: https://github.pie.apple.com/IPR/apache-incubator-iceberg/pull/1025
# - name: apple-spark-2.12_3.4.0-snapshot-iceberg-spark-test-jars
# branchName: branch-3.4.0-apple
# build:
# template: freestyle:v4:build
# steps:
# - build/mvn -Phadoop-3 -Phive -Piceberg -Dtest="org/apache/iceberg/*" -DwildcardSuites=none test

# - name: apple-spark-2.12_3.4.0-snapshot-iceberg-spark-test-jars-pr
# branchName: branch-3.4.0-apple
# build:
# template: freestyle:v4:prb
# steps:
# - build/mvn -Phadoop-3 -Phive -Piceberg -Dtest="org/apache/iceberg/*" -DwildcardSuites=none test

- name: apple-spark-2.12_3.4.0-snapshot-iceberg
branchName: branch-3.4.0-apple
build:
template: freestyle:v4:build
steps:
- export NEW_VERSION="$(sed -n '29s/<version>\(.*\)<\/version>/\1/p' pom.xml | xargs)-iceberg"
- build/mvn versions:set -DnewVersion="$NEW_VERSION" -DgenerateBackupPoms=false
- build/mvn install -Phive -Piceberg -Phadoop-3 -DskipTests
- git clone git@github.pie.apple.com:IPR/apache-incubator-iceberg.git
- cd apache-incubator-iceberg
- git checkout -b apple-1.3.x origin/apple-1.3.x
- sed -i "s/sparkVersion = \(.*\)/sparkVersion = '${NEW_VERSION}'/g" spark/v3.4/build.gradle
- sed -i "s/org\.apache\.hive:\* = \(.*\)/org\.apache\.hive:\* = $(sed -n 's/<hive\.version>\(.*\)<\/hive\.version>/\1/p' ../pom.xml | xargs)/g" versions.props
- ./gradlew test

- name: apple-spark-2.12_3.4.0-snapshot-iceberg-pr
branchName: branch-3.4.0-apple
build:
template: freestyle:v4:prb
steps:
- export NEW_VERSION="$(sed -n '29s/<version>\(.*\)<\/version>/\1/p' pom.xml | xargs)-iceberg"
- build/mvn versions:set -DnewVersion="$NEW_VERSION" -DgenerateBackupPoms=false
- build/mvn install -Phive -Piceberg -Phadoop-3 -DskipTests
- git clone git@github.pie.apple.com:IPR/apache-incubator-iceberg.git
- cd apache-incubator-iceberg
- git checkout -b apple-1.3.x origin/apple-1.3.x
- sed -i "s/sparkVersion = \(.*\)/sparkVersion = '${NEW_VERSION}'/g" spark/v3.4/build.gradle
- sed -i "s/org\.apache\.hive:\* = \(.*\)/org\.apache\.hive:\* = $(sed -n 's/<hive\.version>\(.*\)<\/hive\.version>/\1/p' ../pom.xml | xargs)/g" versions.props
- ./gradlew test

- name: apple-spark-2.12_3.4.0-snapshot-iceberg-hive-test-jars
branchName: branch-3.4.0-apple
build:
template: freestyle:v4:build
steps:
- build/mvn -Phadoop-3 -Phive -Piceberg -Dtest="org/apache/iceberg/hive/*" -DwildcardSuites=none test

- name: apple-spark-2.12_3.4.0-snapshot-iceberg-hive-test-jars-pr
branchName: branch-3.4.0-apple
build:
template: freestyle:v4:prb
steps:
- build/mvn -Phadoop-3 -Phive -Piceberg -Dtest="org/apache/iceberg/hive/*" -DwildcardSuites=none test

- name: apple-spark-2.12_3.4.0-snapshot-launcher-repl-tools
branchName: branch-3.4.0-apple
build:
Expand Down
207 changes: 207 additions & 0 deletions sql/iceberg/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ 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 xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.spark</groupId>
<artifactId>spark-parent_2.12</artifactId>
<version>3.4.0.25-apple-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<artifactId>spark-iceberg_2.12</artifactId>
<packaging>jar</packaging>
<name>Spark Project Iceberg Test</name>
<url>http://spark.apache.org/</url>
<properties>
<sbt.project.name>iceberg</sbt.project.name>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_${scala.binary.version}</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_${scala.binary.version}</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-sql_${scala.binary.version}</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-sql_${scala.binary.version}</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-catalyst_${scala.binary.version}</artifactId>
<type>test-jar</type>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-hive_${scala.binary.version}</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-tags_${scala.binary.version}</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.parquet</groupId>
<artifactId>parquet-hadoop</artifactId>
<version>${parquet.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>

<dependency>
<groupId>${hive.group}</groupId>
<artifactId>hive-common</artifactId>
<scope>${hive.common.scope}</scope>
</dependency>
<dependency>
<groupId>${hive.group}</groupId>
<artifactId>hive-exec</artifactId>
<classifier>${hive.classifier}</classifier>
</dependency>
<dependency>
<groupId>${hive.group}</groupId>
<artifactId>hive-metastore</artifactId>
</dependency>
<dependency>
<groupId>${hive.group}</groupId>
<artifactId>hive-serde</artifactId>
<scope>${hive.serde.scope}</scope>
</dependency>
<dependency>
<groupId>${hive.group}</groupId>
<artifactId>hive-shims</artifactId>
<scope>${hive.shims.scope}</scope>
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-llap-common</artifactId>
<scope>${hive.llap.scope}</scope>
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-llap-client</artifactId>
<scope>${hive.llap.scope}</scope>
</dependency>
<!-- hive-serde already depends on avro, but this brings in customized config of avro deps from parent -->
<dependency>
<groupId>org.apache.avro</groupId>
<artifactId>avro</artifactId>
</dependency>
<dependency>
<groupId>org.apache.avro</groupId>
<artifactId>avro-mapred</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
</dependency>
<!-- transitive dependencies of hive-exec-core doesn't declare -->
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
</dependency>
<dependency>
<groupId>org.jodd</groupId>
<artifactId>jodd-core</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
</dependency>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>${hadoop-client-runtime.artifact}</artifactId>
<scope>${hadoop.deps.scope}</scope>
</dependency>
<dependency>
<groupId>org.apache.thrift</groupId>
<artifactId>libthrift</artifactId>
</dependency>
<dependency>
<groupId>org.apache.thrift</groupId>
<artifactId>libfb303</artifactId>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-compiler</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.scalacheck</groupId>
<artifactId>scalacheck_${scala.binary.version}</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.iceberg</groupId>
<artifactId>iceberg-spark-runtime-3.4_${scala.binary.version}</artifactId>
</dependency>

<!-- Run Iceberg unit tests -->
<dependency>
<groupId>org.apache.iceberg</groupId>
<artifactId>iceberg-spark-3.4_${scala.binary.version}</artifactId>
<classifier>shadow-tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.iceberg</groupId>
<artifactId>iceberg-hive-metastore</artifactId>
<classifier>shadow-tests</classifier>
<scope>test</scope>
</dependency>
</dependencies>
</project>

0 comments on commit 2f432eb

Please sign in to comment.