Skip to content

Conversation

@witgo
Copy link
Contributor

@witgo witgo commented Jun 4, 2014

No description provided.

@AmplabJenkins
Copy link

Merged build triggered.

@AmplabJenkins
Copy link

Merged build started.

@tgravescs
Copy link
Contributor

Please provide more description or problem and how to reproduce and open a jira.

@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/15449/

Copy link
Contributor

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).

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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.

@witgo
Copy link
Contributor Author

witgo commented Jun 5, 2014

@tgravescs @vanzin
Spark configuration
conf/spark-defaults.conf =>

spark.yarn.dist.archives     /toona/conf
spark.executor.extraClassPath ./conf
spark.driver.extraClassPath  ./conf

HDFS directory
hadoop dfs -cat /toona/conf/toona.conf =>

 redis.num=4

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)

  }
}

@witgo witgo changed the title [WIP] In yarn.ClientBase spark.yarn.dist.* do not work [WIP] [SPARK-2051]In yarn.ClientBase spark.yarn.dist.* do not work Jun 6, 2014
@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/15550/

@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/15680/

@vanzin
Copy link
Contributor

vanzin commented Jun 11, 2014

@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

@tgravescs
Copy link
Contributor

@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.

@witgo
Copy link
Contributor Author

witgo commented Jun 12, 2014

@tgravescs
Still have some questions not discussed clearly.
@vanzin doesn't like to do so.

@witgo witgo changed the title [WIP] [SPARK-2051]In yarn.ClientBase spark.yarn.dist.* do not work [SPARK-2051]In yarn.ClientBase spark.yarn.dist.* do not work Jun 12, 2014
@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/15756/

@AmplabJenkins
Copy link

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

@AmplabJenkins
Copy link

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

@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/15848/

Copy link
Contributor

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

@tgravescs
Copy link
Contributor

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://).

@AmplabJenkins
Copy link

Merged build triggered.

@AmplabJenkins
Copy link

Merged build started.

@AmplabJenkins
Copy link

Merged build finished.

@AmplabJenkins
Copy link

Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/15849/

@tgravescs
Copy link
Contributor

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.

@witgo
Copy link
Contributor Author

witgo commented Jun 17, 2014

spark-defaults.conf command path
spark.yarn.dist.archives /other/path ./bin/spark-submit --archives /some/path --master yarn-cluster file://some/path
spark.yarn.dist.archives /other/path ./bin/spark-submit --archives /some/path --master yarn-client file://some/path
spark.yarn.dist.archives /other/path ./bin/spark-submit --master yarn-cluster file://other/path
spark.yarn.dist.archives /other/path ./bin/spark-submit --master yarn-client file://other/path
spark.yarn.dist.archives hdfs://other/path ./bin/spark-submit --master yarn-client hdfs://other/path
spark.yarn.dist.archives /other/path SPARK_YARN_DIST_ARCHIVES=/some/path ./bin/spark-submit --master yarn-client hdfs://some/path
spark.yarn.dist.archives /other/path SPARK_YARN_DIST_ARCHIVES=/some/path ./bin/spark-submit --master yarn-cluster hdfs://some/path

@witgo
Copy link
Contributor Author

witgo commented Jun 17, 2014

@tgravescs
spark.yarn.dist.* related is concentrated in ClientArguments is a good solution

@tgravescs
Copy link
Contributor

Looks good.

@asfgit asfgit closed this in bce0897 Jun 19, 2014
@witgo witgo deleted the yarn_ClientBase branch June 20, 2014 07:16
pdeyhim pushed a commit to pdeyhim/spark-1 that referenced this pull request Jun 25, 2014
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
xiliu82 pushed a commit to xiliu82/spark that referenced this pull request Sep 4, 2014
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
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