Skip to content

Commit 533d9c3

Browse files
committed
[SPARK-51146][INFRA] Publish a new Spark distribution with Spark Connect enabled (extra tarball)
### What changes were proposed in this pull request? This is the second step to publish a new Spark distribution with Spark Connect enabled. A new tarball will be published with Spark Connect enabled and other default settings (Hadoop 3 and Scala 2.13). The new PyPI package will be added later. ### Why are the changes needed? new Spark Connect distribution ### Does this PR introduce _any_ user-facing change? no ### How was this patch tested? manually tested with dry-run mode. ### Was this patch authored or co-authored using generative AI tooling? no Closes #49885 from cloud-fan/release. Authored-by: Wenchen Fan <[email protected]> Signed-off-by: Wenchen Fan <[email protected]>
1 parent 1ba759f commit 533d9c3

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

core/src/main/scala/org/apache/spark/internal/config/package.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2831,5 +2831,6 @@ package object config {
28312831
.stringConf
28322832
.transform(_.toLowerCase(Locale.ROOT))
28332833
.checkValues(Set("connect", "classic"))
2834-
.createWithDefault("classic")
2834+
.createWithDefault(
2835+
if (sys.env.get("SPARK_CONNECT_MODE").contains("1")) "connect" else "classic")
28352836
}

dev/create-release/release-build.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,16 @@ if [[ "$1" == "package" ]]; then
338338
--output spark-$SPARK_VERSION-bin-$NAME.tgz.asc \
339339
--detach-sig spark-$SPARK_VERSION-bin-$NAME.tgz
340340
shasum -a 512 spark-$SPARK_VERSION-bin-$NAME.tgz > spark-$SPARK_VERSION-bin-$NAME.tgz.sha512
341+
342+
if [[ -n $SPARK_CONNECT_FLAG ]]; then
343+
echo "Copying and signing Spark Connect binary distribution"
344+
SPARK_CONNECT_DIST_NAME=spark-$SPARK_VERSION-bin-$NAME-spark-connect.tgz
345+
cp spark-$SPARK_VERSION-bin-$NAME/$SPARK_CONNECT_DIST_NAME .
346+
echo $GPG_PASSPHRASE | $GPG --passphrase-fd 0 --armour \
347+
--output $SPARK_CONNECT_DIST_NAME.asc \
348+
--detach-sig $SPARK_CONNECT_DIST_NAME
349+
shasum -a 512 $SPARK_CONNECT_DIST_NAME > $SPARK_CONNECT_DIST_NAME.sha512
350+
fi
341351
}
342352

343353
# List of binary packages built. Populates two associative arrays, where the key is the "name" of

dev/make-distribution.sh

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -317,12 +317,9 @@ if [ "$MAKE_TGZ" == "true" ]; then
317317
TARDIR="$SPARK_HOME/$TARDIR_NAME"
318318
rm -rf "$TARDIR"
319319
cp -r "$DISTDIR" "$TARDIR"
320-
sed -i -e '$s/.*/export SPARK_CONNECT_MODE=1\
321-
&/' "$TARDIR/bin/pyspark"
322-
sed -i -e '$s/.*/export SPARK_CONNECT_MODE=1\
323-
&/' "$TARDIR/bin/spark-shell"
324-
sed -i -e '$s/.*/export SPARK_CONNECT_MODE=1\
325-
&/' "$TARDIR/bin/spark-submit"
320+
sed -i -e '$s/.*/export SPARK_CONNECT_MODE=1\n&/' "$TARDIR/bin/pyspark"
321+
sed -i -e '$s/.*/export SPARK_CONNECT_MODE=1\n&/' "$TARDIR/bin/spark-shell"
322+
sed -i -e '$s/.*/export SPARK_CONNECT_MODE=1\n&/' "$TARDIR/bin/spark-submit"
326323
$TAR -czf "$TARDIR_NAME.tgz" -C "$SPARK_HOME" "$TARDIR_NAME"
327324
rm -rf "$TARDIR"
328325
fi

0 commit comments

Comments
 (0)