Skip to content

Conversation

holdenk
Copy link
Contributor

@holdenk holdenk commented Sep 21, 2017

What changes were proposed in this pull request?

Check JDK version (with javac) and use SPARK_VERSION for publish-release

How was this patch tested?

Manually tried local build with wrong JDK / JAVA_HOME & built a local release (LFTP disabled)

@holdenk
Copy link
Contributor Author

holdenk commented Sep 21, 2017

cc @JoshRosen

@SparkQA
Copy link

SparkQA commented Sep 21, 2017

Test build #82048 has finished for PR 19312 at commit aa4cbf6.

  • This patch fails PySpark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HyukjinKwon
Copy link
Member

retest this please

@SparkQA
Copy link

SparkQA commented Sep 22, 2017

Test build #82056 has finished for PR 19312 at commit aa4cbf6.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

fi

# Verify we have the right java version set
java_version=$("${JAVA_HOME}"/bin/javac -version 2>&1 | cut -d " " -f 2)
Copy link
Member

Choose a reason for hiding this comment

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

@holdenk, should we maybe catch the case when JAVA_HOME is missing too?

If so, I think we could do something like ...

if [ -z "$JAVA_HOME" ]; then
  echo "Please set JAVA_HOME."
  exit 1
fi
...

Or maybe...

if [[ -x "$JAVA_HOME/bin/javac" ]]; then
  javac_cmd="$JAVA_HOME/bin/javac"
else
  javac_cmd=javac
fi

java_version=$("$javac_cmd" -version 2>&1 | cut -d " " -f 2)
...

I tested both in my local.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. The logic we use in make-distribution to resolve JAVA_HOME when not set is a bit more complicated, but I think for the release script its reasonable (and probably a good practice) to explicitly require a JAVA_HOME to be set so I'll go with the first of the 2.

Copy link
Member

@HyukjinKwon HyukjinKwon left a comment

Choose a reason for hiding this comment

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

LGTM, just one comment

asfgit pushed a commit that referenced this pull request Sep 22, 2017
## What changes were proposed in this pull request?

Check JDK version (with javac) and use SPARK_VERSION for publish-release

## How was this patch tested?

Manually tried local build with wrong JDK / JAVA_HOME & built a local release (LFTP disabled)

Author: Holden Karau <[email protected]>

Closes #19312 from holdenk/improve-release-scripts-r2.

(cherry picked from commit 8f130ad)
Signed-off-by: Holden Karau <[email protected]>
asfgit pushed a commit that referenced this pull request Sep 22, 2017
## What changes were proposed in this pull request?

Check JDK version (with javac) and use SPARK_VERSION for publish-release

## How was this patch tested?

Manually tried local build with wrong JDK / JAVA_HOME & built a local release (LFTP disabled)

Author: Holden Karau <[email protected]>

Closes #19312 from holdenk/improve-release-scripts-r2.

(cherry picked from commit 8f130ad)
Signed-off-by: Holden Karau <[email protected]>
@asfgit asfgit closed this in 8f130ad Sep 22, 2017
@SparkQA
Copy link

SparkQA commented Sep 22, 2017

Test build #82071 has finished for PR 19312 at commit 94d7659.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@holdenk
Copy link
Contributor Author

holdenk commented Sep 22, 2017

Merged to master, branch-2.2, and branch-2.1.

MatthewRBruce pushed a commit to Shopify/spark that referenced this pull request Jul 31, 2018
## What changes were proposed in this pull request?

Check JDK version (with javac) and use SPARK_VERSION for publish-release

## How was this patch tested?

Manually tried local build with wrong JDK / JAVA_HOME & built a local release (LFTP disabled)

Author: Holden Karau <[email protected]>

Closes apache#19312 from holdenk/improve-release-scripts-r2.

(cherry picked from commit 8f130ad)
Signed-off-by: Holden Karau <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants