-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-2051]In yarn.ClientBase spark.yarn.dist.* do not work #969
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
Conversation
|
Merged build triggered. |
|
Merged build started. |
|
Please provide more description or problem and how to reproduce and open a jira. |
|
Merged build finished. All automated tests passed. |
|
All automated tests passed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think env variables and conf entries should be handled here like this.
YarnClientSchedulerBackend already deals with the env variable and command line option for client mode. It seems that SparkSubmit might be missing code to handle the env variable for cluster mode, though. Probably better to fix it there, and leave this code to deal only with the command line args (which are already correctly parsed).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vanzin This is a yarn cluster problems. Don't use YarnClientSchedulerBackend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you see the other PR I mentioned (see #969 (comment))?
There's a bug in the Yarn code where configuration is not propagated correctly in cluster mode, which I fixed there. So you don't need this here because with my fix, these options should be correctly propagated without any extra code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, Weekend, I will test your branch, Please merge the master changes.
|
@tgravescs @vanzin HDFS directory The following command execution fails YARN_CONF_DIR=/etc/hadoop/conf ./bin/spark-submit --num-executors 2 --driver-memory 2g --executor-memory 2g --master yarn-cluster --class toona.DeployTest toona-assembly.jar The following is the test code package toona
import com.typesafe.config.Config
import com.typesafe.config.ConfigFactory
object DeployTest {
def main(args: Array[String]) {
val conf = ConfigFactory.load("toona.conf")
val redisNum = conf.getInt("redis.num") // Here will throw an `ConfigException` exception
assert(redisNum == 4)
}
} |
|
Merged build triggered. |
|
Merged build started. |
|
Merged build finished. All automated tests passed. |
|
All automated tests passed. |
|
Merged build triggered. |
|
Merged build started. |
|
Merged build finished. All automated tests passed. |
|
All automated tests passed. |
|
@witgo You didn't address my comments. You're duplicating logic that's already mostly there in SparkSubmit, just needs to be fixed a little for yarn cluster mode. See my previous comment. As for your test, see: #560, more specifically: vanzin@08268f0 |
|
@witgo the [WIP] tag tells me you are still working on this, looking for early comments on the approach, and its not really fully done and ready for review, is that the case? If not can you please remove that tag. |
|
@tgravescs |
|
Merged build triggered. |
|
Merged build started. |
|
Merged build finished. All automated tests passed. |
|
All automated tests passed. |
|
All automated tests passed. |
|
All automated tests passed. |
|
Merged build triggered. |
|
Merged build started. |
|
Merged build finished. All automated tests passed. |
|
All automated tests passed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this logic is already handled by spark-submit, no reason to duplicate
|
Sorry if I wan't clear. I didn't mean to update ClientArguments with that logic, I just meant that is the logic we want overall. We don't want to duplicate code if possible. Overall I think if the --files/--archives are specified to ClientArguments we don't touch them. If they aren't specified we look at the config variables and resolveURI them. Then we need to modify the YarnClientSchedulerBackend to properly handle when spark.yarn.dist.archives/spark.yarn.dist.files configs are set (but not set by spark-submit script) (it should default to file://, not hdfs://). |
|
Merged build triggered. |
|
Merged build started. |
|
Merged build finished. |
|
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/15849/ |
|
note I think it woudl be easiest just to have YarnClientSchedulerBackend ignore the configs spark.yarn.dist.archives/spark.yarn.dist.files and only do the backwards compatibility for the ENV variables. Then your changes to clientArguments would handle calling resolveURI on them. |
|
|
@tgravescs |
|
Looks good. |
Author: witgo <[email protected]> Closes apache#969 from witgo/yarn_ClientBase and squashes the following commits: 8117765 [witgo] review commit 3bdbc52 [witgo] Merge branch 'master' of https://github.com/apache/spark into yarn_ClientBase 5261b6c [witgo] fix sys.props.get("SPARK_YARN_DIST_FILES") e3c1107 [witgo] update docs b6a9aa1 [witgo] merge master c8b4554 [witgo] review commit 2f48789 [witgo] Merge branch 'master' of https://github.com/apache/spark into yarn_ClientBase 8d7b82f [witgo] Merge branch 'master' of https://github.com/apache/spark into yarn_ClientBase 1048549 [witgo] remove Utils.resolveURIs 871f1db [witgo] add spark.yarn.dist.* documentation 41bce59 [witgo] review commit 35d6fa0 [witgo] move to ClientArguments 55d72fc [witgo] Merge branch 'master' of https://github.com/apache/spark into yarn_ClientBase 9cdff16 [witgo] review commit 8bc2f4b [witgo] review commit 20e667c [witgo] Merge branch 'master' into yarn_ClientBase 0961151 [witgo] merge master ce609fc [witgo] Merge branch 'master' into yarn_ClientBase 8362489 [witgo] yarn.ClientBase spark.yarn.dist.* do not work
Author: witgo <[email protected]> Closes apache#969 from witgo/yarn_ClientBase and squashes the following commits: 8117765 [witgo] review commit 3bdbc52 [witgo] Merge branch 'master' of https://github.com/apache/spark into yarn_ClientBase 5261b6c [witgo] fix sys.props.get("SPARK_YARN_DIST_FILES") e3c1107 [witgo] update docs b6a9aa1 [witgo] merge master c8b4554 [witgo] review commit 2f48789 [witgo] Merge branch 'master' of https://github.com/apache/spark into yarn_ClientBase 8d7b82f [witgo] Merge branch 'master' of https://github.com/apache/spark into yarn_ClientBase 1048549 [witgo] remove Utils.resolveURIs 871f1db [witgo] add spark.yarn.dist.* documentation 41bce59 [witgo] review commit 35d6fa0 [witgo] move to ClientArguments 55d72fc [witgo] Merge branch 'master' of https://github.com/apache/spark into yarn_ClientBase 9cdff16 [witgo] review commit 8bc2f4b [witgo] review commit 20e667c [witgo] Merge branch 'master' into yarn_ClientBase 0961151 [witgo] merge master ce609fc [witgo] Merge branch 'master' into yarn_ClientBase 8362489 [witgo] yarn.ClientBase spark.yarn.dist.* do not work
No description provided.