You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by witgo <gi...@git.apache.org> on 2014/06/04 19:06:43 UTC

[GitHub] spark pull request: [WIP] In yarn.ClientBase spark.yarn.dist.* do ...

GitHub user witgo opened a pull request:

    https://github.com/apache/spark/pull/969

    [WIP] In yarn.ClientBase spark.yarn.dist.* do not work

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/witgo/spark yarn_ClientBase

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/969.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #969
    
----
commit 836248956ff3ef17d44cea37b357e3616b054d64
Author: witgo <wi...@qq.com>
Date:   2014-06-04T16:50:12Z

    yarn.ClientBase spark.yarn.dist.* do not work

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by witgo <gi...@git.apache.org>.
Github user witgo commented on a diff in the pull request:

    https://github.com/apache/spark/pull/969#discussion_r13738885
  
    --- Diff: yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientBase.scala ---
    @@ -220,10 +220,21 @@ trait ClientBase extends Logging {
           }
         }
     
    +    def getArg(arg: String, envVar: String, sysProp: String): String = {
    +      if (arg != null && !arg.isEmpty) {
    +        arg
    +      } else if (System.getenv(envVar) != null && !System.getenv(envVar).isEmpty) {
    +        System.getenv(envVar)
    +      } else {
    +        sparkConf.getOption(sysProp).orNull
    +      }
    +    }
         var cachedSecondaryJarLinks = ListBuffer.empty[String]
    -    val fileLists = List( (args.addJars, LocalResourceType.FILE, true),
    -      (args.files, LocalResourceType.FILE, false),
    -      (args.archives, LocalResourceType.ARCHIVE, false) )
    +    val fileLists = List((args.addJars, LocalResourceType.FILE, true),
    +      (getArg(args.files, "SPARK_YARN_DIST_FILES", "spark.yarn.dist.files"),
    +        LocalResourceType.FILE, false),
    +      (getArg(args.archives, "SPARK_YARN_DIST_ARCHIVES", "spark.yarn.dist.archives"),
    --- End diff --
    
    I see, Weekend, I will test your branch, Please merge the master changes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46030346
  
    Merged build finished. All automated tests passed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-45983110
  
     Merged build triggered. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by tgravescs <gi...@git.apache.org>.
Github user tgravescs commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46009163
  
    Can you please be more specific on your description of this problem?  Does it only occur in yarn cluster mode (or is it both cluster and client mode)?  YarnClientSchedulerBackend I believe should handle loading that config in client mode so I believe you are only seeing the problem in yarn-cluster mode.
    
    I think the reason is that it was put in to replace the environment variables for client mode (SPARK_YARN_DIST_ARCHIVES) and also when spark-submit was added.  Originally there was no config for specifying this in yarn-cluster mode.  I'm definitely fine with adding that support but I think your jira should be changed to an improvement.  I also had just filed SPARK-2139 but I think that should just be combined with this and it documented here. 
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by tgravescs <gi...@git.apache.org>.
Github user tgravescs commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46324631
  
    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.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by witgo <gi...@git.apache.org>.
Github user witgo commented on a diff in the pull request:

    https://github.com/apache/spark/pull/969#discussion_r13777641
  
    --- Diff: yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientArguments.scala ---
    @@ -45,6 +44,12 @@ class ClientArguments(val args: Array[String], val sparkConf: SparkConf) {
     
       parseArgs(args.toList)
     
    +  files = Option(files).getOrElse(sparkConf.getOption("spark.yarn.dist.files").orNull)
    +  files = Option(files).map(p => Utils.resolveURIs(p)).orNull
    --- End diff --
    
      files = Option(files).getOrElse(sparkConf.getOption("spark.yarn.dist.files").
        map(p => Utils.resolveURIs(p)).orNull)
    As you say the code should look like this
    ```scala
      files = Option(files).getOrElse(sparkConf.getOption("spark.yarn.dist.files").
        map(p => Utils.resolveURIs(p)).orNull)
    
      archives = Option(archives).getOrElse(sparkConf.getOption("spark.yarn.dist.archives").
        map(p => Utils.resolveURIs(p)).orNull)
    ``` 
    `spark.yarn.dist.*`  and `--archives/--files` behavior is different, this is a bit strange.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by witgo <gi...@git.apache.org>.
Github user witgo commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46040404
  
    @tgravescs [SPARK-1951](https://issues.apache.org/jira/browse/SPARK-1951) should be related to the issue you said


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46259088
  
    Merged build started. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46259357
  
    Merged build started. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46032726
  
    Hey @tgravescs, my issue with this change is that I'm pretty sure it's the same issue I fixed in the last commit pushed to PR#560 (at least half of it).
    
    The other half seems to be that SparkSubmit is not correctly handling some of these options for yarn-cluster mode; but it's been several days since I looked at that part so I don't remember the details. But I'm pretty sure about the first half above.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [WIP] [SPARK-2051]In yarn.ClientBase spark.yar...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-45750854
  
    All automated tests passed.
    Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/15680/


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46202989
  
     Merged build triggered. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46027790
  
     Merged build triggered. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-45983120
  
    Merged build started. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [WIP] [SPARK-2051]In yarn.ClientBase spark.yar...

Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-45805466
  
    @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: https://github.com/apache/spark/pull/560, more specifically:  https://github.com/vanzin/spark/commit/08268f0b7091f42a661b7b0d6fde256980140ff9



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by tgravescs <gi...@git.apache.org>.
Github user tgravescs commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46052395
  
    @witgo  what is your usecase for needing these as configs? Can you just use the spark-submit options? Like I mention above these were never supported as straight up configs.  The more I look at this, the more complexity it is adding and I'm not sure its adding much benefit.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46262113
  
    All automated tests passed.
    Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/15835/


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46324466
  
    Merged build started. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by witgo <gi...@git.apache.org>.
Github user witgo commented on a diff in the pull request:

    https://github.com/apache/spark/pull/969#discussion_r13784281
  
    --- Diff: yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientArguments.scala ---
    @@ -45,6 +44,12 @@ class ClientArguments(val args: Array[String], val sparkConf: SparkConf) {
     
       parseArgs(args.toList)
     
    +  files = Option(files).getOrElse(sparkConf.getOption("spark.yarn.dist.files").orNull)
    +  files = Option(files).map(p => Utils.resolveURIs(p)).orNull
    --- End diff --
    
    This `Utils.resolveURIs(p)` will change the behavior of `YarnClientSchedulerBackend` ,should be removed .


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46018045
  
    Merged build started. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by tgravescs <gi...@git.apache.org>.
Github user tgravescs commented on a diff in the pull request:

    https://github.com/apache/spark/pull/969#discussion_r13755813
  
    --- Diff: yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientArguments.scala ---
    @@ -45,6 +44,14 @@ class ClientArguments(val args: Array[String], val sparkConf: SparkConf) {
     
       parseArgs(args.toList)
     
    +  files = Option(files).getOrElse(sys.env.get("SPARK_YARN_DIST_FILES").orNull)
    --- End diff --
    
    I don't want to add support for the env variables for yarn-cluster mode.  We only support them on yarn-client mode for backwards compatibility. Can you remove this.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by tgravescs <gi...@git.apache.org>.
Github user tgravescs commented on a diff in the pull request:

    https://github.com/apache/spark/pull/969#discussion_r13865835
  
    --- Diff: yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientArguments.scala ---
    @@ -45,6 +44,25 @@ class ClientArguments(val args: Array[String], val sparkConf: SparkConf) {
     
       parseArgs(args.toList)
     
    +  // -archives/--files via spark submit or yarn-client defaults to use file:// if not specified
    +  if (sys.props.contains("SPARK_SUBMIT") || (sparkConf.getOption("spark.master").isDefined &&
    --- End diff --
    
    this logic is already handled by spark-submit, no reason to duplicate


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [WIP] [SPARK-2051]In yarn.ClientBase spark.yar...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-45458837
  
    Merged build finished. All automated tests passed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46259077
  
     Merged build triggered. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46025354
  
     Merged build triggered. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [WIP] In yarn.ClientBase spark.yarn.dist.* do ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-45125352
  
    Merged build finished. All automated tests passed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46324445
  
     Merged build triggered. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46052446
  
    @tgravescs thanks for clarifying. I should have read the most recent patch - I still had the original one in my head, which did a lot of things that didn't need to be done. My bad there.
    
    You're right, setting that in the conf file doesn't work. (It would be nice to have the PR title and description reflect the actual issue.)
    
    Also, perhaps this is a good chance to get rid of `spark.yarn.dist.files` and use `spark.files` like the others? It doesn't seem like it was documented, and if there's a need to keep backwards compatibility, that can be done in the yarn code; that means one less custom OptionAssigner for Yarn in SparkSubmit.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46262110
  
    All automated tests passed.
    Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/15836/


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [WIP] [SPARK-2051]In yarn.ClientBase spark.yar...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-45750853
  
    Merged build finished. All automated tests passed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by tgravescs <gi...@git.apache.org>.
Github user tgravescs commented on a diff in the pull request:

    https://github.com/apache/spark/pull/969#discussion_r13755838
  
    --- Diff: yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientArguments.scala ---
    @@ -45,6 +44,14 @@ class ClientArguments(val args: Array[String], val sparkConf: SparkConf) {
     
       parseArgs(args.toList)
     
    +  files = Option(files).getOrElse(sys.env.get("SPARK_YARN_DIST_FILES").orNull)
    +  files = Option(files).getOrElse(sparkConf.getOption("spark.yarn.dist.files").orNull)
    +  files = Option(files).map(p => Utils.resolveURIs(p)).orNull
    +
    +  archives = Option(archives).getOrElse(sys.env.get("SPARK_YARN_DIST_ARCHIVES").orNull)
    --- End diff --
    
    same as above comment.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46283977
  
     Merged build triggered. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by witgo <gi...@git.apache.org>.
Github user witgo commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46327168
  
     `spark.yarn.dist.*` related is concentrated in  `ClientArguments` is a good idea


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46032398
  
    All automated tests passed.
    Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/15766/


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [WIP] [SPARK-2051]In yarn.ClientBase spark.yar...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-45744995
  
    Merged build started. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [WIP] In yarn.ClientBase spark.yarn.dist.* do ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-45120602
  
    Merged build started. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by tgravescs <gi...@git.apache.org>.
Github user tgravescs commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46051735
  
    for example try: 
    /work/spark_stream_test/target/scala-2.10/streamingtest_2.10-1.0.jar \
        --properties-file /home/vanzin/tmp/spark.conf --master yarn --deploy-mode cluster \
        --class  com.cloudera.ss.SillyDepSleeper --jars local:/tmp/kite-data-core-0.11.0.jar
    
    in spark-defaults.conf set:
    spark.yarn.dist.files /home/vanzin/tmp/log4j.properties
    spark.yarn.dist.archives /home/vanzin/tmp/wordcount.tgz


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46030347
  
    All automated tests passed.
    Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/15765/


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46106289
  
     Merged build triggered. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46002435
  
     Merged build triggered. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by witgo <gi...@git.apache.org>.
Github user witgo commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46011803
  
    @tgravescs  This problem only found in the yarn cluster mode. 
    In the yarn client mode. [YarnClientSchedulerBackend.scala#L64](
    https://github.com/apache/spark/blob/master/yarn/common/src/main/scala/org/apache/spark/scheduler/cluster/YarnClientSchedulerBackend.scala#L64)  correctly deal with `spark.yarn.dist.*`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by witgo <gi...@git.apache.org>.
Github user witgo commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46326177
  
    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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46023406
  
    Merged build finished. All automated tests passed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by witgo <gi...@git.apache.org>.
Github user witgo commented on a diff in the pull request:

    https://github.com/apache/spark/pull/969#discussion_r13702112
  
    --- Diff: yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientBase.scala ---
    @@ -220,10 +220,21 @@ trait ClientBase extends Logging {
           }
         }
     
    +    def getArg(arg: String, envVar: String, sysProp: String): String = {
    +      if (arg != null && !arg.isEmpty) {
    +        arg
    +      } else if (System.getenv(envVar) != null && !System.getenv(envVar).isEmpty) {
    +        System.getenv(envVar)
    +      } else {
    +        sparkConf.getOption(sysProp).orNull
    +      }
    +    }
         var cachedSecondaryJarLinks = ListBuffer.empty[String]
    -    val fileLists = List( (args.addJars, LocalResourceType.FILE, true),
    -      (args.files, LocalResourceType.FILE, false),
    -      (args.archives, LocalResourceType.ARCHIVE, false) )
    +    val fileLists = List((args.addJars, LocalResourceType.FILE, true),
    +      (getArg(args.files, "SPARK_YARN_DIST_FILES", "spark.yarn.dist.files"),
    +        LocalResourceType.FILE, false),
    +      (getArg(args.archives, "SPARK_YARN_DIST_ARCHIVES", "spark.yarn.dist.archives"),
    --- End diff --
    
    @vanzin  This is a yarn cluster problems. Don't use `YarnClientSchedulerBackend `.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by tgravescs <gi...@git.apache.org>.
Github user tgravescs commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46037439
  
    Ok. I haven't had time to look at that in depth.  Unfortunately the configs and things have become a bit of a mess due to everything changing to spark-submit and changed to use sparkConf all at once. 
    I think at one point not all the configs were being set in SparkConf and some were still just system properties and some of those were set after the SparkConf creation. I think that maybe why that was done that way.  But I need to look at it in depth more.
    
    I don't really see how that fixes this issue though.  That may forward the configs on but in yarn-cluster mode it doesn't do anything with the spark.yarn.dist.* configs without witgo's change.  ie it doesn't populate archives or files in anyway even though the configs are there.  You need some code to tell it to 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46262109
  
    Merged build finished. All automated tests passed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46283995
  
    Merged build started. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by tgravescs <gi...@git.apache.org>.
Github user tgravescs commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46191458
  
    @witgo As I stated above, the config for client mode is not meant for the end user, it is for internal use that is why I consider this an improvement and not a bug.
    
    Note that just removing resolveUri's makes the behavior inconsistent with the sparkSubmit --archives/--files options. 
    
    The behavior we want if we add these configs:
      - --archives/--files via sparksubmit defaults to use file:// if not specified, for both yarn-client and yarn-cluster
     - spark.yarn.dist.archives/spark.yarn.dist.files defaults to use file:// if not specified, for both yarn-client and yarn-cluster 
      - env variable SPARK_YARN_DIST_ARCHIVES/SPARK_YARN_DIST_FILES set in yarn-client then it should default to hdfs://
      - --files/--archives specified from spark-class in yarn-cluster mode then it should default to hdfs://


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46018031
  
     Merged build triggered. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [WIP] In yarn.ClientBase spark.yarn.dist.* do ...

Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/969#discussion_r13417150
  
    --- Diff: yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientBase.scala ---
    @@ -220,10 +220,21 @@ trait ClientBase extends Logging {
           }
         }
     
    +    def getArg(arg: String, envVar: String, sysProp: String): String = {
    +      if (arg != null && !arg.isEmpty) {
    +        arg
    +      } else if (System.getenv(envVar) != null && !System.getenv(envVar).isEmpty) {
    +        System.getenv(envVar)
    +      } else {
    +        sparkConf.getOption(sysProp).orNull
    +      }
    +    }
         var cachedSecondaryJarLinks = ListBuffer.empty[String]
    -    val fileLists = List( (args.addJars, LocalResourceType.FILE, true),
    -      (args.files, LocalResourceType.FILE, false),
    -      (args.archives, LocalResourceType.ARCHIVE, false) )
    +    val fileLists = List((args.addJars, LocalResourceType.FILE, true),
    +      (getArg(args.files, "SPARK_YARN_DIST_FILES", "spark.yarn.dist.files"),
    +        LocalResourceType.FILE, false),
    +      (getArg(args.archives, "SPARK_YARN_DIST_ARCHIVES", "spark.yarn.dist.archives"),
    --- End diff --
    
    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).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by tgravescs <gi...@git.apache.org>.
Github user tgravescs commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46588888
  
    Looks good.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46290064
  
    All automated tests passed.
    Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/15848/


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [WIP] [SPARK-2051]In yarn.ClientBase spark.yar...

Posted by tgravescs <gi...@git.apache.org>.
Github user tgravescs commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-45891513
  
    @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.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-45987365
  
    All automated tests passed.
    Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/15756/


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46290061
  
    Merged build finished. All automated tests passed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/969#discussion_r13712776
  
    --- Diff: yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientBase.scala ---
    @@ -220,10 +220,21 @@ trait ClientBase extends Logging {
           }
         }
     
    +    def getArg(arg: String, envVar: String, sysProp: String): String = {
    +      if (arg != null && !arg.isEmpty) {
    +        arg
    +      } else if (System.getenv(envVar) != null && !System.getenv(envVar).isEmpty) {
    +        System.getenv(envVar)
    +      } else {
    +        sparkConf.getOption(sysProp).orNull
    +      }
    +    }
         var cachedSecondaryJarLinks = ListBuffer.empty[String]
    -    val fileLists = List( (args.addJars, LocalResourceType.FILE, true),
    -      (args.files, LocalResourceType.FILE, false),
    -      (args.archives, LocalResourceType.ARCHIVE, false) )
    +    val fileLists = List((args.addJars, LocalResourceType.FILE, true),
    +      (getArg(args.files, "SPARK_YARN_DIST_FILES", "spark.yarn.dist.files"),
    +        LocalResourceType.FILE, false),
    +      (getArg(args.archives, "SPARK_YARN_DIST_ARCHIVES", "spark.yarn.dist.archives"),
    --- End diff --
    
    Did you see the other PR I mentioned (see https://github.com/apache/spark/pull/969#issuecomment-45805466)?
    
    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.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by witgo <gi...@git.apache.org>.
Github user witgo commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46074277
  
     My point is that, cluster and client mode should be consistent. `spark.yarn.dist.*` only works in client mode is not perfect.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by witgo <gi...@git.apache.org>.
Github user witgo commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46198873
  
    @tgravescs  The code should be like this?
    
    ClientArguments:
    ```scala
      // -archives/--files via spark submit or yarn-client defaults to use file:// if not specified
      if (sys.props.contains("SPARK_SUBMIT") || (sparkConf.getOption("spark.master").isDefined &&
        sparkConf.get("spark.master") == "yarn-client")) {
        files = Option(files).map(p => Utils.resolveURIs(p)).orNull
        archives = Option(archives).map(p => Utils.resolveURIs(p)).orNull
      }
    
      // env variable SPARK_YARN_DIST_ARCHIVES/SPARK_YARN_DIST_FILES set in yarn-client then
      // it should default to hdfs://
      files = Option(files).getOrElse(sys.props.get("SPARK_YARN_DIST_FILES").orNull)
      archives = Option(archives).getOrElse(sys.props.get("SPARK_YARN_DIST_ARCHIVES").orNull)
    
      // spark.yarn.dist.archives/spark.yarn.dist.files defaults to use file:// if not specified,
      // for both yarn-client and yarn-cluster
      files = Option(files).getOrElse(sparkConf.getOption("spark.yarn.dist.files").
        map(p => Utils.resolveURIs(p)).orNull)
      archives = Option(archives).getOrElse(sparkConf.getOption("spark.yarn.dist.archives").
        map(p => Utils.resolveURIs(p)).orNull)
    
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46324474
  
    
    Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/15849/


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46262106
  
    Merged build finished. All automated tests passed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by tgravescs <gi...@git.apache.org>.
Github user tgravescs commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46040708
  
    yes that jira should be closed as works as designed. They changed the default scheme for spark-submit to be file:/// rather then hdfs:///.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46023409
  
    All automated tests passed.
    Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/15763/


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [WIP] [SPARK-2051]In yarn.ClientBase spark.yar...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-45457568
  
    Merged build started. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46025374
  
    Merged build started. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [WIP] In yarn.ClientBase spark.yarn.dist.* do ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-45120576
  
     Merged build triggered. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by tgravescs <gi...@git.apache.org>.
Github user tgravescs commented on a diff in the pull request:

    https://github.com/apache/spark/pull/969#discussion_r13749661
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/SparkSubmitArguments.scala ---
    @@ -131,6 +132,13 @@ private[spark] class SparkSubmitArguments(args: Seq[String]) {
         if (name == null && primaryResource != null) {
           name = Utils.stripDirectory(primaryResource)
         }
    +
    +    if (master.startsWith("yarn")) {
    --- End diff --
    
    seems a bit odd to be putting yarn specific configs in here.  This also won't allow it to work if you are using spark-class directly. Which actually shouldn't be required but it might be nice to be able to use the configs if you are using java directly instead of the spark-submit script (if you are using oozie for instance).  Based on all that I would prefer to see this moved into the yarn Client.  Sorry if I am late on my comments. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by tgravescs <gi...@git.apache.org>.
Github user tgravescs commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46034525
  
    @vanzin can you please clarify that is a big pr fixing multiple things?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46324473
  
    Merged build finished. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/spark/pull/969


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [WIP] In yarn.ClientBase spark.yarn.dist.* do ...

Posted by witgo <gi...@git.apache.org>.
Github user witgo commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-45224988
  
     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
    ```shell
    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 testing the code
    ```scala
    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)
    
      }
    }
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46106877
  
    Merged build finished. All automated tests passed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by tgravescs <gi...@git.apache.org>.
Github user tgravescs commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46324012
  
    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://).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by witgo <gi...@git.apache.org>.
Github user witgo commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46027714
  
    Done.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46035195
  
    The last commit, where I make the code behave the same in yarn-cluster and yarn-client mode: 
    https://github.com/vanzin/spark/commit/08268f0b7091f42a661b7b0d6fde256980140ff9
    
    Before my change, cluster mode will only forward configs set in system properties and ignore configs set through other means.
    
    Without a proper explanation from @witgo, based just on my understanding of his patch, it looks to me like most, if not all of the changes, are already covered by my patch.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46203003
  
    Merged build started. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46005348
  
    
    Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/15760/


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46051206
  
    I rebased my code in pr #560, and tries this command:
    
        YARN_CONF_DIR=/home/vanzin/tmp/yarn-conf ./bin/spark-submit \
            /work/spark_stream_test/target/scala-2.10/streamingtest_2.10-1.0.jar \
            --properties-file /home/vanzin/tmp/spark.conf --master yarn --deploy-mode cluster \
            --class  com.cloudera.ss.SillyDepSleeper --jars local:/tmp/kite-data-core-0.11.0.jar \
            --files /home/vanzin/tmp/log4j.properties --archives /home/vanzin/tmp/wordcount.tgz
    
    `spark.conf` just sets spark.yarn.jar to `local:/something`. Note I'm using both "--files" and "--archives", which get translated into `spark.yarn.dist.files` and `spark.yarn.dist.archives`. I'm also adding a custom jar to the classpath using `--jars`.
    
    The job runs and succeeds (it depends on a class in the kite jar I referenced in the command line), and when I look at the local directory for the Yarn container I see this there:
    
        /yarn/nm/usercache/vanzin/appcache/application_1402520894306_0014/container_1402520894306_0014_01_000003/wordcount.tgz
        /yarn/nm/usercache/vanzin/appcache/application_1402520894306_0014/container_1402520894306_0014_01_000003/log4j.properties
    
    (Among others.) The log file I set up in log4j.properties is also used by the process, so it's correctly uploading my local file.
    
    So @witgo, can you explain more clearly what is it that is not working, and which case is not handled by my patch?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by witgo <gi...@git.apache.org>.
Github user witgo commented on a diff in the pull request:

    https://github.com/apache/spark/pull/969#discussion_r13750513
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/SparkSubmitArguments.scala ---
    @@ -131,6 +132,13 @@ private[spark] class SparkSubmitArguments(args: Seq[String]) {
         if (name == null && primaryResource != null) {
           name = Utils.stripDirectory(primaryResource)
         }
    +
    +    if (master.startsWith("yarn")) {
    --- End diff --
    
    Put in `ClientArguments`?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [WIP] [SPARK-2051]In yarn.ClientBase spark.yar...

Posted by witgo <gi...@git.apache.org>.
Github user witgo commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-45893165
  
    @tgravescs
    Still have some questions not discussed clearly.
    @vanzin doesn't like to do so.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by witgo <gi...@git.apache.org>.
Github user witgo commented on a diff in the pull request:

    https://github.com/apache/spark/pull/969#discussion_r13763852
  
    --- Diff: yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientArguments.scala ---
    @@ -45,6 +44,12 @@ class ClientArguments(val args: Array[String], val sparkConf: SparkConf) {
     
       parseArgs(args.toList)
     
    +  files = Option(files).getOrElse(sparkConf.getOption("spark.yarn.dist.files").orNull)
    +  files = Option(files).map(p => Utils.resolveURIs(p)).orNull
    --- End diff --
    
    @tgravescs   `Utils.resolveURIs` method, unless expressly stated, all other are local path.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46209842
  
    
    Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/15818/


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by tgravescs <gi...@git.apache.org>.
Github user tgravescs commented on a diff in the pull request:

    https://github.com/apache/spark/pull/969#discussion_r13767184
  
    --- Diff: yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientArguments.scala ---
    @@ -45,6 +44,12 @@ class ClientArguments(val args: Array[String], val sparkConf: SparkConf) {
     
       parseArgs(args.toList)
     
    +  files = Option(files).getOrElse(sparkConf.getOption("spark.yarn.dist.files").orNull)
    +  files = Option(files).map(p => Utils.resolveURIs(p)).orNull
    --- End diff --
    
    thanks @witgo, you are right, I actually had it backwards.  Because of this line it always make it default to file://.  When we use the env variable for yarn-client or if its specified via the --archives/--files option with spark-class it should default to look in hdfs. That is the previous behavior from 0.9.   
    
    so we should change this to only do the map(p => Utils.resolveURIs(p)) if it is actually reading it from spark.yarn.dist.files.  If its specified in --archives/--files then we shouldn't resolveURI's.
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46106290
  
    Merged build started. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [WIP] [SPARK-2051]In yarn.ClientBase spark.yar...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-45744973
  
     Merged build triggered. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46209840
  
    Merged build finished. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46005347
  
    Merged build finished. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46002447
  
    Merged build started. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46259351
  
     Merged build triggered. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-45987363
  
    Merged build finished. All automated tests passed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46106878
  
    All automated tests passed.
    Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/15802/


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [WIP] In yarn.ClientBase spark.yarn.dist.* do ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-45125353
  
    All automated tests passed.
    Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/15449/


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by tgravescs <gi...@git.apache.org>.
Github user tgravescs commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46051547
  
    @vanzin its not an issue when using the sparkSubmit options (--archives/--files). Its only an issue if you try to use the configs directly (spark.yarn.dist.files and spark.yarn.dist.archives) in yarn-cluster mode without specifying them in the --archives/--files.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46032397
  
    Merged build finished. All automated tests passed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [WIP] In yarn.ClientBase spark.yarn.dist.* do ...

Posted by tgravescs <gi...@git.apache.org>.
Github user tgravescs commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-45124529
  
    Please provide more description or problem and how to reproduce and open a jira.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by tgravescs <gi...@git.apache.org>.
Github user tgravescs commented on a diff in the pull request:

    https://github.com/apache/spark/pull/969#discussion_r13866068
  
    --- Diff: yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientArguments.scala ---
    @@ -45,6 +44,25 @@ class ClientArguments(val args: Array[String], val sparkConf: SparkConf) {
     
       parseArgs(args.toList)
     
    +  // -archives/--files via spark submit or yarn-client defaults to use file:// if not specified
    +  if (sys.props.contains("SPARK_SUBMIT") || (sparkConf.getOption("spark.master").isDefined &&
    +    sparkConf.get("spark.master") == "yarn-client")) {
    +    files = Option(files).map(p => Utils.resolveURIs(p)).orNull
    +    archives = Option(archives).map(p => Utils.resolveURIs(p)).orNull
    +  }
    +
    +  // env variable SPARK_YARN_DIST_ARCHIVES/SPARK_YARN_DIST_FILES set in yarn-client then
    +  // it should default to hdfs://
    +  files = Option(files).getOrElse(sys.env.get("SPARK_YARN_DIST_FILES").orNull)
    --- End diff --
    
    again this is already handled in the YarnClientSchedulerBackend. It reads the env variables and passes in the --files/--archives without being resolveURI extended.  The issue with that code is that it also looks at spark.yarn.dist.archives and spark.yarn.dist.files and doesn't resolveURI extend them. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [WIP] [SPARK-2051]In yarn.ClientBase spark.yar...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-45457562
  
     Merged build triggered. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by tgravescs <gi...@git.apache.org>.
Github user tgravescs commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46027049
  
    @vanzin I think you commented earlier on moving this to sparksubmit.  Sorry I had missed that.  Do you have any objections to moving it closer inside yarn code?
    
    Side note -  we can't remove the code from YarnClientSchedulerBackend.scala because it handles the ENV variable and it also needs to keep the default of looking in hdfs first for backwards compatibility. 
    
    @witgo can you add the configs to the yarn documentation (docs/running-on-yarn.md). You can just use the same description that spark-submit spits out:
    
    archives: Comma separated list of archives to be extracted into the
                                  working directory of each executor.
    files: Comma-separated list of files to be placed in the working
                                  directory of each executor.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by tgravescs <gi...@git.apache.org>.
Github user tgravescs commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46039256
  
    I did actually think of another issue with this though and that is that if I specify spark.yarn.dist.* in the config in yarn-client mode its going to default to hdfs:// and in yarn-cluster mode its going to default to file:// so we will have to fix that while leaving the env variable in hdfs://. 
    
    I think we can simply the logic for this in SparkSubmit in the OptionAssigner table to just use the config now for both cluster and client mode. Change YarnClientSchedulerBackend to only specify the --archives flag if the ENV variables is set to keep backwards compatibility.  Everything else falls though to the config check in ClientArguments.
    
    It would also be nice if we could add a Unit test for this.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [SPARK-2051]In yarn.ClientBase spark.yarn.dist...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-46027805
  
    Merged build started. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] spark pull request: [WIP] [SPARK-2051]In yarn.ClientBase spark.yar...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/969#issuecomment-45458839
  
    All automated tests passed.
    Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/15550/


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---