Skip to content

Conversation

@pwendell
Copy link
Contributor

The previous check didn't account for the fact that the default
deploy mode is "client" unless otherwise specified. Also, this
sets the more narrowly defined SPARK_DRIVER_MEMORY instead of setting
SPARK_MEM.

The previous check didn't account for the fact that the default
deploy mode is "client" unless otherwise specified. Also, this
sets the more narrowly defined SPARK_DRIVER_MEM instead of setting
SPARK_MEM.
@AmplabJenkins
Copy link

Merged build triggered.

@AmplabJenkins
Copy link

Merged build started.

@pwendell
Copy link
Contributor Author

This was reported by @witgo.

@AmplabJenkins
Copy link

Merged build finished. All automated tests passed.

@AmplabJenkins
Copy link

All automated tests passed.
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/14884/

@aarondav
Copy link
Contributor

I'm actually a little nervous about the default value of DEPLOY_MODE. Do you think we could put an explicit line in the shell script like

# Default deploy mode is "client".
DEPLOY_MODE=${DEPLOY_MODE:-"client"}

We can keep the rest of your solution as-is, I just like having a 2-valued DEPLOY_MODE better than a 3-valued one.

@pwendell
Copy link
Contributor Author

@aarondav - would never want to make you nervous. I made the suggested change. Mind taking a look?

@AmplabJenkins
Copy link

Merged build triggered.

@AmplabJenkins
Copy link

Merged build started.

@AmplabJenkins
Copy link

Merged build finished. All automated tests passed.

@AmplabJenkins
Copy link

All automated tests passed.
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/14891/

bin/spark-submit Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry to not notice this earlier,but given the default value, I think the equality check with "client" now may make more sense.

Also, along similar lines, perhaps we could use -n instead of ! -z for DRIVER_MEMORY, and also wrap the variables in quotes. For instance, right now if $DRIVER_MEMORY is not set, this is actually evaluating if [ ! -z ], which happens to evaluate to false, but is confusing because if [ ! -n ] also evaluates to false. By putting quotes around it, we'll make sure we actually evaluate if [ -n "" ] if it's empty, which has the semantics we're actually looking for.

@pwendell
Copy link
Contributor Author

@aarondav check again? Responded to your feedback.

@AmplabJenkins
Copy link

Merged build triggered.

@AmplabJenkins
Copy link

Merged build started.

@AmplabJenkins
Copy link

Merged build finished. All automated tests passed.

@AmplabJenkins
Copy link

All automated tests passed.
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/14892/

@aarondav
Copy link
Contributor

LGTM, merged into master and branch-1.0. Thanks!!

asfgit pushed a commit that referenced this pull request May 12, 2014
The previous check didn't account for the fact that the default
deploy mode is "client" unless otherwise specified. Also, this
sets the more narrowly defined SPARK_DRIVER_MEMORY instead of setting
SPARK_MEM.

Author: Patrick Wendell <[email protected]>

Closes #730 from pwendell/spark-submit and squashes the following commits:

430b98f [Patrick Wendell] Feedback from Aaron
e788edf [Patrick Wendell] Changes based on Aaron's feedback
f508146 [Patrick Wendell] SPARK-1652: Set driver memory correctly in spark-submit.

(cherry picked from commit 05c9aa9)
Signed-off-by: Aaron Davidson <[email protected]>
@asfgit asfgit closed this in 05c9aa9 May 12, 2014
pdeyhim pushed a commit to pdeyhim/spark-1 that referenced this pull request Jun 25, 2014
The previous check didn't account for the fact that the default
deploy mode is "client" unless otherwise specified. Also, this
sets the more narrowly defined SPARK_DRIVER_MEMORY instead of setting
SPARK_MEM.

Author: Patrick Wendell <[email protected]>

Closes apache#730 from pwendell/spark-submit and squashes the following commits:

430b98f [Patrick Wendell] Feedback from Aaron
e788edf [Patrick Wendell] Changes based on Aaron's feedback
f508146 [Patrick Wendell] SPARK-1652: Set driver memory correctly in spark-submit.
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.

3 participants