HyukjinKwon commented on code in PR #50363:
URL: https://github.com/apache/spark/pull/50363#discussion_r2009962925
##########
dev/make-distribution.sh:
##########
@@ -320,12 +320,12 @@ if [ "$MAKE_TGZ" == "true" ]; then
rm -rf "$TARDIR"
cp -r "$DISTDIR" "$TARDIR"
# Set the Spark Connect system variable in these scripts to enable it by
default.
- awk 'NR==1{print; print "export SPARK_CONNECT_MODE=1"; next} {print}'
"$TARDIR/bin/pyspark" > tmp && cat tmp > "$TARDIR/bin/pyspark"
- awk 'NR==1{print; print "export SPARK_CONNECT_MODE=1"; next} {print}'
"$TARDIR/bin/spark-shell" > tmp && cat tmp > "$TARDIR/bin/spark-shell"
- awk 'NR==1{print; print "export SPARK_CONNECT_MODE=1"; next} {print}'
"$TARDIR/bin/spark-submit" > tmp && cat tmp > "$TARDIR/bin/spark-submit"
- awk 'NR==1{print; print "set SPARK_CONNECT_MODE=1"; next} {print}'
"$TARDIR/bin/pyspark2.cmd" > tmp && cat tmp > "$TARDIR/bin/pyspark2.cmd"
- awk 'NR==1{print; print "set SPARK_CONNECT_MODE=1"; next} {print}'
"$TARDIR/bin/spark-shell2.cmd" > tmp && cat tmp > "$TARDIR/bin/spark-shell2.cmd"
- awk 'NR==1{print; print "set SPARK_CONNECT_MODE=1"; next} {print}'
"$TARDIR/bin/spark-submit2.cmd" > tmp && cat tmp >
"$TARDIR/bin/spark-submit2.cmd"
+ awk 'NR==1{print; print "export
SPARK_CONNECT_MODE=${SPARK_CONNECT_MODE:-1}"; next} {print}'
"$TARDIR/bin/pyspark" > tmp && cat tmp > "$TARDIR/bin/pyspark"
Review Comment:
Now, it does not set `SPARK_CONNECT_MODE` to `1` when it is already set in
its parent process or scripts.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]