Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-22377][BUILD] Use /usr/sbin/lsof if lsof does not exists in release-build.sh #19695

Closed
wants to merge 1 commit into from
Closed
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
11 changes: 9 additions & 2 deletions dev/create-release/release-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,13 @@ else
fi
fi

# This is a band-aid fix to avoid the failure of Maven nightly snapshot in some Jenkins
# machines by explicitly calling /usr/sbin/lsof. Please see SPARK-22377 and the discussion
# in its pull request.
LSOF=lsof
if ! hash $LSOF 2>/dev/null; then
LSOF=/usr/sbin/lsof
fi

if [ -z "$SPARK_PACKAGE_VERSION" ]; then
SPARK_PACKAGE_VERSION="${SPARK_VERSION}-$(date +%Y_%m_%d_%H_%M)-${git_hash}"
Expand Down Expand Up @@ -345,7 +352,7 @@ if [[ "$1" == "publish-snapshot" ]]; then
# -DskipTests $SCALA_2_12_PROFILES $PUBLISH_PROFILES clean deploy

# Clean-up Zinc nailgun process
lsof -P |grep $ZINC_PORT | grep LISTEN | awk '{ print $2; }' | xargs kill
$LSOF -P |grep $ZINC_PORT | grep LISTEN | awk '{ print $2; }' | xargs kill

rm $tmp_settings
cd ..
Expand Down Expand Up @@ -382,7 +389,7 @@ if [[ "$1" == "publish-release" ]]; then
# -DskipTests $SCALA_2_12_PROFILES §$PUBLISH_PROFILES clean install

# Clean-up Zinc nailgun process
lsof -P |grep $ZINC_PORT | grep LISTEN | awk '{ print $2; }' | xargs kill
$LSOF -P |grep $ZINC_PORT | grep LISTEN | awk '{ print $2; }' | xargs kill

#./dev/change-scala-version.sh 2.11

Expand Down