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-5188][BUILD] make-distribution.sh should support curl, not only wget to get Tachyon #3988

Closed
wants to merge 11 commits into from

Conversation

sarutak
Copy link
Member

@sarutak sarutak commented Jan 10, 2015

When we use make-distribution.sh with --with-tachyon option, Tachyon will be downloaded by wget command but some systems don't have wget by default (MacOS X doesn't have).
Other scripts like build/mvn, build/sbt support not only wget but also curl so make-distribution.sh should support curl too.

@SparkQA
Copy link

SparkQA commented Jan 10, 2015

Test build #25349 has finished for PR 3988 at commit 83b49b5.

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

@@ -48,11 +48,11 @@ install_app() {
# check if we already have the tarball
# check if we have curl installed
# download application
[ ! -f "${local_tarball}" ] && [ -n "`which curl 2>/dev/null`" ] && \
[ ! -f "${local_tarball}" ] && [ -n "`type curl 2>/dev/null`" ] && \
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we replacing which with type? What's the difference between the two commands? I'm guessing you want to avoid the external process call and variation of behavior across POSIX systems for which.

Copy link
Contributor

Choose a reason for hiding this comment

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

FWIW, the approach recommended in this answer, which I agree with, is to use command -v, though honestly one way or the other it doesn't seem like a big deal.

@sarutak
Copy link
Member Author

sarutak commented Jan 20, 2015

@nchammas Thanks for your advise. I modified to use command command.

@@ -48,11 +48,11 @@ install_app() {
# check if we already have the tarball
# check if we have curl installed
# download application
[ ! -f "${local_tarball}" ] && [ -n "`which curl 2>/dev/null`" ] && \
[ ! -f "${local_tarball}" ] && command -v curl &>/dev/null && \
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of &>/dev/null, which seems a little confusing, can't we use

if [ $(command -v curl) ];

to test for the existence of curl?

We don't have to redirect output if we do it this way, and it's much more readable. I suggest using this pattern throughout.

@SparkQA
Copy link

SparkQA commented Jan 20, 2015

Test build #25824 has finished for PR 3988 at commit 1e4c7e0.

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

@nchammas
Copy link
Contributor

LGTM.

@sarutak Did you test this on OS X?

@SparkQA
Copy link

SparkQA commented Jan 20, 2015

Test build #25828 has finished for PR 3988 at commit 2db9fbf.

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

@sarutak
Copy link
Member Author

sarutak commented Jan 20, 2015

@nchammas I confirmed all my changes work but there is another problem in build/mvn, which is not related to my changes. It's a blocker so I separated the PR #4124 to fix the issue.

@@ -224,14 +224,24 @@ cp -r "$SPARK_HOME/ec2" "$DISTDIR"
if [ "$SPARK_TACHYON" == "true" ]; then
TACHYON_VERSION="0.5.0"
TACHYON_URL="https://github.com/amplab/tachyon/releases/download/v${TACHYON_VERSION}/tachyon-${TACHYON_VERSION}-bin.tar.gz"
TACHYON_TGZ="tachyon-${TACHYON_VERSION}-bin.tar.gz"
Copy link
Contributor

Choose a reason for hiding this comment

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

can you define this first and then use this in TACHYON_URL also?

@pwendell
Copy link
Contributor

LGTM pending a minor comment regarding style.

@SparkQA
Copy link

SparkQA commented Jan 20, 2015

Test build #25841 has finished for PR 3988 at commit a3e908b.

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

@SparkQA
Copy link

SparkQA commented Jan 20, 2015

Test build #25851 has finished for PR 3988 at commit 7cc8255.

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

@SparkQA
Copy link

SparkQA commented Jan 23, 2015

Test build #25990 has finished for PR 3988 at commit e24e01b.

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

@sarutak
Copy link
Member Author

sarutak commented Jan 23, 2015

retest this please.

@SparkQA
Copy link

SparkQA commented Jan 23, 2015

Test build #25994 has finished for PR 3988 at commit e24e01b.

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

@sarutak
Copy link
Member Author

sarutak commented Jan 23, 2015

retest this please.

@SparkQA
Copy link

SparkQA commented Jan 23, 2015

Test build #26001 has finished for PR 3988 at commit e24e01b.

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

@pwendell
Copy link
Contributor

@sarutak can you bring this up to date?

@SparkQA
Copy link

SparkQA commented Jan 27, 2015

Test build #26130 has finished for PR 3988 at commit 010e884.

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

@sarutak
Copy link
Member Author

sarutak commented Jan 27, 2015

It's now up-to-date.

@SparkQA
Copy link

SparkQA commented Jan 28, 2015

Test build #26205 has finished for PR 3988 at commit 0f546e0.

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

@asfgit asfgit closed this in e902dc4 Jan 28, 2015
@sarutak sarutak deleted the SPARK-5188 branch April 11, 2015 05:24
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