From 8fb6ffdf84a75b02e13f901b3e87f8ddfbf1d17f Mon Sep 17 00:00:00 2001
From: Cheng Pan <379377944@qq.com>
Date: Sat, 17 Apr 2021 11:07:07 +0800
Subject: [PATCH] [KYUUBI #535] [BUILD] In favor using profile in maven command
### _Why are the changes needed?_
Recap the background of Hadoop dependencies in Kyuubi.
1. Kyuubi Server depends on few Hadoop UGI classes to support Kerbose, and those are pretty stable APIs through decade. So we decided use hadoop shaded client instead of hadoop vanilla client to avoid transitive deps, see #398.
2. Current Kyuubi build against Spark 3.0, 3.1 and 3.2-SNOTSHOT(master), all of them support and dist with both hadoop-2.7 and hadoop-3.2.
The property `hadoop.binary.version` only affect which `spark-bin-hadoop-{hadoop-version}.tgz` we will use to run integration tests in `kyuubi-main` module and include into Kyuubi binary dist bundle, and kyuubi server itself always depends on hadoop shaded client 3.2.2, thus we named the maven profile `spark-hadoop-2.7/3.2`.
### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
- [ ] Add screenshots for manual tests if appropriate
- [ ] [Run test](https://kyuubi.readthedocs.io/en/latest/tools/testing.html#running-tests) locally before make a pull request
Closes #535 from pan3793/maven.
Closes #535
8959c797 [Cheng Pan] [BUILD] In favor using profile in maven command
Authored-by: Cheng Pan <379377944@qq.com>
Signed-off-by: Cheng Pan <379377944@qq.com>
---
.github/workflows/master.yml | 2 +-
.github/workflows/release.yml | 16 ++++++++--------
.travis.yml | 4 ++--
pom.xml | 5 ++++-
4 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml
index e357e48ba..05fd071b2 100644
--- a/.github/workflows/master.yml
+++ b/.github/workflows/master.yml
@@ -36,7 +36,7 @@ jobs:
- '-Pspark-3.0'
- '-Pspark-3.0 -Dspark.archive.mirror=https://archive.apache.org/dist/spark/spark-3.1.1 -Dspark.archive.name=spark-3.1.1-bin-hadoop2.7.tgz -Dmaven.plugin.scalatest.exclude.tags=org.apache.kyuubi.tags.DataLakeTest'
- '-Pspark-3.1'
- - '-Pspark-3.1 -Dhadoop.binary.version=3.2'
+ - '-Pspark-3.1 -Pspark-hadoop-3.2'
- '-Pspark-3.2-snapshot -pl :kyuubi-spark-sql-engine,:kyuubi-common,:kyuubi-ha,:kyuubi-zookeeper -Dmaven.plugin.scalatest.exclude.tags=org.apache.kyuubi.tags.DataLakeTest'
env:
SPARK_LOCAL_IP: localhost
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 805e63f74..5ca95054f 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -34,14 +34,14 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: '1.8'
- - name: Make Distribution -Pspark-3.0
- run: ./build/dist --tgz -Pspark-3.0
- - name: Make Distribution -Pspark-3.0 -Dhadoop.binary.version=3.2
- run: ./build/dist --tgz -Pspark-3.0 -Dhadoop.binary.version=3.2
- - name: Make Distribution -Pspark-3.1
- run: ./build/dist --tgz -Pspark-3.1
- - name: Make Distribution -Pspark-3.1 -Dhadoop.binary.version=3.2
- run: ./build/dist --tgz -Pspark-3.1 -Dhadoop.binary.version=3.2
+ - name: Make Distribution -Pspark-3.0 -Pspark-hadoop-2.7
+ run: ./build/dist --tgz -Pspark-3.0 -Pspark-hadoop-2.7
+ - name: Make Distribution -Pspark-3.0 -Pspark-hadoop-3.2
+ run: ./build/dist --tgz -Pspark-3.0 -Pspark-hadoop-3.2
+ - name: Make Distribution -Pspark-3.1 -Pspark-hadoop-2.7
+ run: ./build/dist --tgz -Pspark-3.1 -Pspark-hadoop-2.7
+ - name: Make Distribution -Pspark-3.1 -Pspark-hadoop-3.2
+ run: ./build/dist --tgz -Pspark-3.1 -Pspark-hadoop-3.2
- name: Make Distribution --spark-provided
run: ./build/dist --tgz --spark-provided
- name: Create Release
diff --git a/.travis.yml b/.travis.yml
index 5a979ac02..4545742bb 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -36,9 +36,9 @@ matrix:
env:
- PROFILE="-Pspark-3.1"
- EXCLUDE_TAGS="org.apache.kyuubi.tags.DataLakeTest"
- - name: Test Kyuubi w/ -Pspark-3.1 -Dhadoop.binary.version=3.2
+ - name: Test Kyuubi w/ -Pspark-3.1 -Pspark-hadoop-3.2
env:
- - PROFILE="-Pspark-3.1 -Dhadoop.binary.version=3.2"
+ - PROFILE="-Pspark-3.1 -Dspark-hadoop-3.2"
- EXCLUDE_TAGS="org.apache.kyuubi.tags.DataLakeTest"
- name: Test Kyuubi w/ -Pspark-3.0 w/ Spark 3.1 distribution
env:
diff --git a/pom.xml b/pom.xml
index 17ed9c94f..fafff5959 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1442,11 +1442,14 @@
spark-3.1
3.1.1
- 2.7
org.apache.kyuubi.tags.DataLakeTest
+
+ spark-hadoop-2.7
+
+
spark-hadoop-3.2