Skip to content

Commit 0594cad

Browse files
committed
[SPARK-39461][INFRA] Print SPARK_LOCAL_(HOSTNAME|IP) in build/(mvn|sbt)
### What changes were proposed in this pull request? This PR aims to print `SPARK_LOCAL_(HOSTNAME|IP)` during building and testing at `build/{mvn|sbt}` if they are provided by the users. ### Why are the changes needed? `SPARK_LOCAL_HOSTNAME` and `SPARK_LOCAL_IP` are used during testing and the test result depends on them. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass the CIs and check GitHub Action logs. Closes #36862 from dongjoon-hyun/SPARK-39461. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent 69c5bac commit 0594cad

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

build/mvn

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,13 @@ export MAVEN_OPTS=${MAVEN_OPTS:-"$_COMPILE_JVM_OPTS"}
180180

181181
echo "Using \`mvn\` from path: $MVN_BIN" 1>&2
182182

183+
if [ ! -z "${SPARK_LOCAL_HOSTNAME}" ]; then
184+
echo "Using SPARK_LOCAL_HOSTNAME=$SPARK_LOCAL_HOSTNAME" 1>&2
185+
fi
186+
if [ ! -z "${SPARK_LOCAL_IP}" ]; then
187+
echo "Using SPARK_LOCAL_IP=$SPARK_LOCAL_IP" 1>&2
188+
fi
189+
183190
# call the `mvn` command as usual
184191
# SPARK-25854
185192
"${MVN_BIN}" "$@"

build/sbt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,13 @@ saveSttySettings() {
133133
fi
134134
}
135135

136+
if [ ! -z "${SPARK_LOCAL_HOSTNAME}" ]; then
137+
echo "Using SPARK_LOCAL_HOSTNAME=$SPARK_LOCAL_HOSTNAME" 1>&2
138+
fi
139+
if [ ! -z "${SPARK_LOCAL_IP}" ]; then
140+
echo "Using SPARK_LOCAL_IP=$SPARK_LOCAL_IP" 1>&2
141+
fi
142+
136143
saveSttySettings
137144
trap onExit INT
138145

0 commit comments

Comments
 (0)