Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 4 additions & 26 deletions bin/load-kyuubi-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,32 +71,11 @@ fi
export KYUUBI_SCALA_VERSION="${KYUUBI_SCALA_VERSION:-"2.12"}"

if [[ -f ${KYUUBI_HOME}/RELEASE ]]; then
KYUUBI_VERSION="$(grep "Kyuubi " "$KYUUBI_HOME/RELEASE" | awk -F ' ' '{print $2}')"
FLINK_VERSION_BUILD="$(grep "Flink " "$KYUUBI_HOME/RELEASE" | awk -F ' ' '{print $2}')"
SPARK_VERSION_BUILD="$(grep "Spark " "$KYUUBI_HOME/RELEASE" | awk -F ' ' '{print $2}' | grep -v 'Hadoop')"
HADOOP_VERSION_BUILD="$(grep "Spark Hadoop " "$KYUUBI_HOME/RELEASE" | awk -F ' ' '{print $3}')"
FLINK_BUILTIN="${KYUUBI_HOME}/externals/flink-$FLINK_VERSION_BUILD"
SPARK_BUILTIN="${KYUUBI_HOME}/externals/spark-$SPARK_VERSION_BUILD-bin-hadoop${HADOOP_VERSION_BUILD:0:3}"
FLINK_BUILTIN="$(find "$KYUUBI_HOME/externals" -name 'flink-*' -type d | head -n 1)"
SPARK_BUILTIN="$(find "$KYUUBI_HOME/externals" -name 'spark-*' -type d | head -n 1)"
else
MVN="${MVN:-"${KYUUBI_HOME}/build/mvn"}"
KYUUBI_VERSION=$("$MVN" help:evaluate -Dexpression=project.version 2>/dev/null\
| grep -v "INFO"\
| grep -v "WARNING"\
| tail -n 1)
FLINK_VERSION_BUILD=$("$MVN" help:evaluate -Dexpression=flink.version 2>/dev/null\
| grep -v "INFO"\
| grep -v "WARNING"\
| tail -n 1)
SPARK_VERSION_BUILD=$("$MVN" help:evaluate -Dexpression=spark.version 2>/dev/null\
| grep -v "INFO"\
| grep -v "WARNING"\
| tail -n 1)
HADOOP_VERSION_BUILD=$("$MVN" help:evaluate -Dexpression=hadoop.binary.version 2>/dev/null\
| grep -v "INFO"\
| grep -v "WARNING"\
| tail -n 1)
FLINK_BUILTIN="${KYUUBI_HOME}/externals/kyuubi-download/target/flink-$FLINK_VERSION_BUILD"
SPARK_BUILTIN="${KYUUBI_HOME}/externals/kyuubi-download/target/spark-$SPARK_VERSION_BUILD-bin-hadoop${HADOOP_VERSION_BUILD}"
FLINK_BUILTIN="$(find "$KYUUBI_HOME/externals/kyuubi-download/target" -name 'flink-*' -type d | head -n 1)"
SPARK_BUILTIN="$(find "$KYUUBI_HOME/externals/kyuubi-download/target" -name 'spark-*' -type d | head -n 1)"
fi

export FLINK_HOME="${FLINK_HOME:-"${FLINK_BUILTIN}"}"
Expand All @@ -109,7 +88,6 @@ if [ $silent -eq 0 ]; then
echo "JAVA_HOME: ${JAVA_HOME}"

echo "KYUUBI_HOME: ${KYUUBI_HOME}"
echo "KYUUBI_VERSION: ${KYUUBI_VERSION}"
echo "KYUUBI_CONF_DIR: ${KYUUBI_CONF_DIR}"
echo "KYUUBI_LOG_DIR: ${KYUUBI_LOG_DIR}"
echo "KYUUBI_PID_DIR: ${KYUUBI_PID_DIR}"
Expand Down
16 changes: 5 additions & 11 deletions build/dist
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,6 @@ SPARK_VERSION=$("$MVN" help:evaluate -Dexpression=spark.version $@ 2>/dev/null\
| grep -v "WARNING"\
| tail -n 1)

SPARK_HADOOP_VERSION=$("$MVN" help:evaluate -Dexpression=hadoop.binary.version $@ 2>/dev/null\
| grep -v "INFO"\
| grep -v "WARNING"\
| tail -n 1)

HADOOP_VERSION=$("$MVN" help:evaluate -Dexpression=hadoop.version $@ 2>/dev/null\
| grep -v "INFO"\
| grep -v "WARNING"\
Expand All @@ -175,7 +170,7 @@ if [[ "$NAME" == "none" ]]; then
if [[ "$SPARK_PROVIDED" == "true" ]]; then
SUFFIX=""
else
SUFFIX="-spark-${SPARK_VERSION:0:3}-hadoop${SPARK_HADOOP_VERSION}"
SUFFIX="-spark-${SPARK_VERSION:0:3}"
fi
fi

Expand Down Expand Up @@ -219,7 +214,6 @@ echo "Java $JAVA_VERSION" >> "$DISTDIR/RELEASE"
echo "Scala $SCALA_VERSION" >> "$DISTDIR/RELEASE"
echo "Flink $FLINK_VERSION" >> "$DISTDIR/RELEASE"
echo "Spark $SPARK_VERSION" >> "$DISTDIR/RELEASE"
echo "Spark Hadoop $SPARK_HADOOP_VERSION" >> "$DISTDIR/RELEASE"
echo "Kyuubi Hadoop $HADOOP_VERSION" >> "$DISTDIR/RELEASE"
echo "Hive $HIVE_VERSION" >> "$DISTDIR/RELEASE"
echo "Build flags: $@" >> "$DISTDIR/RELEASE"
Expand Down Expand Up @@ -275,14 +269,14 @@ done

if [[ "$FLINK_PROVIDED" != "true" ]]; then
# Copy flink binary dist
cp -r "$KYUUBI_HOME/externals/kyuubi-download/target/flink-$FLINK_VERSION/" \
"$DISTDIR/externals/flink-$FLINK_VERSION/"
FLINK_BUILTIN="$(find "$KYUUBI_HOME/externals/kyuubi-download/target" -name 'flink-*' -type d)"
cp -r "$FLINK_BUILTIN" "$DISTDIR/externals/"
fi

if [[ "$SPARK_PROVIDED" != "true" ]]; then
# Copy spark binary dist
cp -r "$KYUUBI_HOME/externals/kyuubi-download/target/spark-$SPARK_VERSION-bin-hadoop${SPARK_HADOOP_VERSION}$HIVE_VERSION_SUFFIX/" \
"$DISTDIR/externals/spark-$SPARK_VERSION-bin-hadoop${SPARK_HADOOP_VERSION}$HIVE_VERSION_SUFFIX/"
SPARK_BUILTIN="$(find "$KYUUBI_HOME/externals/kyuubi-download/target" -name 'spark-*' -type d)"
cp -r "$SPARK_BUILTIN" "$DISTDIR/externals/"
fi

# Copy license files
Expand Down
17 changes: 1 addition & 16 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@
<guava.version>30.1-jre</guava.version>
<guava.failureaccess.version>1.0.1</guava.failureaccess.version>
<hadoop.version>3.3.1</hadoop.version>
<hadoop.binary.version>3.2</hadoop.binary.version>
<hive.version>2.3.9</hive.version>
<hudi.version>0.10.0</hudi.version>
<iceberg.name>iceberg-spark-runtime-3.2_${scala.binary.version}</iceberg.name>
Expand Down Expand Up @@ -138,7 +137,7 @@
`delta.version`, `iceberg.name`
-->
<spark.version>3.2.1</spark.version>
<spark.archive.name>spark-${spark.version}-bin-hadoop${hadoop.binary.version}.tgz</spark.archive.name>
<spark.archive.name>spark-${spark.version}-bin-hadoop3.2.tgz</spark.archive.name>
<spark.archive.mirror>https://archive.apache.org/dist/spark/spark-${spark.version}</spark.archive.mirror>
<spark.archive.download.skip>false</spark.archive.download.skip>
<swagger.version>2.1.11</swagger.version>
Expand Down Expand Up @@ -1901,20 +1900,6 @@
</properties>
</profile>

<profile>
Copy link
Contributor

@ulysses-you ulysses-you Feb 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if it's good to remove the Spark Hadoop version profile. The Spark master branch has already moved to Hadoop 3.3.1. So if we upgrade Spark to 3.3 we still need the profile.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when we update spark

before: we update 2 parameters spark.version and hadoop.binary.version, and we need to ensure in our mind that the spark.archive.name is also need to update.

now: we update 1 parameter spark.version only or sometimes 2 if spark.archive.name changes its static pattern

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, then I'm fine with this change. We have already use spark.archive.name in ga workflow, so the Spark Hadoop version can be removed.

<id>spark-hadoop-2.7</id>
<properties>
<hadoop.binary.version>2.7</hadoop.binary.version>
</properties>
</profile>

<profile>
<id>spark-hadoop-3.2</id>
<properties>
<hadoop.binary.version>3.2</hadoop.binary.version>
</properties>
</profile>

<profile>
<id>spark-provided</id>
<properties>
Expand Down