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

[GitHub] spark pull request: Assorted clean-up for Spark-on-YARN.

GitHub user pwendell opened a pull request:

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

    Assorted clean-up for Spark-on-YARN.

    In particular when the HADOOP_CONF_DIRS are not specified.

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

    $ git pull https://github.com/pwendell/spark hadoop-cleanup

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

    https://github.com/apache/spark/pull/488.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 #488
    
----
commit 17929cccb18a47fdd97b0d665290fdf1896070a9
Author: Patrick Wendell <pw...@gmail.com>
Date:   2014-04-22T21:09:47Z

    Assorted clean-up for Spark-on-YARN.
    
    In particular when the HADOOP_CONF_DIRS are not specified.

----


---
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: Assorted clean-up for Spark-on-YARN.

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

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


---
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: Assorted clean-up for Spark-on-YARN.

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

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


---
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: Assorted clean-up for Spark-on-YARN.

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

    https://github.com/apache/spark/pull/488#issuecomment-41118165
  
    Okay merged


---
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: Assorted clean-up for Spark-on-YARN.

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

    https://github.com/apache/spark/pull/488#issuecomment-41097036
  
    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: Assorted clean-up for Spark-on-YARN.

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

    https://github.com/apache/spark/pull/488#discussion_r11878933
  
    --- Diff: conf/spark-env.sh.template ---
    @@ -5,6 +5,7 @@
     
     # Options read when launching programs locally with 
     # ./bin/run-example or ./bin/spark-submit
    +# - HADOOP_CONF_DIR, to point Spark towards Hadoop configuration files
    --- End diff --
    
    I added it there as well, but I'm going to leave it here because it's relevant also to yarn-cluster.


---
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: Assorted clean-up for Spark-on-YARN.

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

    https://github.com/apache/spark/pull/488#issuecomment-41106050
  
    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: Assorted clean-up for Spark-on-YARN.

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

    https://github.com/apache/spark/pull/488#issuecomment-41103002
  
    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: Assorted clean-up for Spark-on-YARN.

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

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


---
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: Assorted clean-up for Spark-on-YARN.

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

    https://github.com/apache/spark/pull/488#discussion_r11877154
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/SparkSubmitArguments.scala ---
    @@ -116,6 +116,15 @@ private[spark] class SparkSubmitArguments(args: Array[String]) {
         if (args.length == 0) printUsageAndExit(-1)
         if (primaryResource == null) SparkSubmit.printErrorAndExit("Must specify a primary resource")
         if (mainClass == null) SparkSubmit.printErrorAndExit("Must specify a main class with --class")
    +    if (master.startsWith("yarn")) {
    +      val hasHadoopEnv = sys.env.contains("HADOOP_CONF_DIR") ||
    +        sys.env.contains("YARN_CONF_DIR") ||
    +        sys.env.contains("SPARK_TESTING")
    +      if (!hasHadoopEnv) {
    +        throw new Exception(s"When running with master '$master'" +
    +          s" either HADOOP_CONF_DIR or YARN_CONF_DIR must be set in the environment.")
    --- End diff --
    
    nit: you don't need the `s` prefix 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: Assorted clean-up for Spark-on-YARN.

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

    https://github.com/apache/spark/pull/488#issuecomment-41097014
  
     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: Assorted clean-up for Spark-on-YARN.

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

    https://github.com/apache/spark/pull/488#issuecomment-41117688
  
    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: Assorted clean-up for Spark-on-YARN.

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

    https://github.com/apache/spark/pull/488#issuecomment-41115824
  
     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: Assorted clean-up for Spark-on-YARN.

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

    https://github.com/apache/spark/pull/488#issuecomment-41104721
  
    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: Assorted clean-up for Spark-on-YARN.

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

    https://github.com/apache/spark/pull/488#discussion_r11877074
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/SparkSubmitArguments.scala ---
    @@ -116,6 +116,15 @@ private[spark] class SparkSubmitArguments(args: Array[String]) {
         if (args.length == 0) printUsageAndExit(-1)
         if (primaryResource == null) SparkSubmit.printErrorAndExit("Must specify a primary resource")
         if (mainClass == null) SparkSubmit.printErrorAndExit("Must specify a main class with --class")
    +    if (master.startsWith("yarn")) {
    +      val hasHadoopEnv = sys.env.contains("HADOOP_CONF_DIR") ||
    +        sys.env.contains("YARN_CONF_DIR") ||
    +        sys.env.contains("SPARK_TESTING")
    --- End diff --
    
    maybe this should be in its own variable: `val testing = sys.env.contains("SPARK_TESTING")`


---
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: Assorted clean-up for Spark-on-YARN.

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

    https://github.com/apache/spark/pull/488#discussion_r11877013
  
    --- Diff: conf/spark-env.sh.template ---
    @@ -5,6 +5,7 @@
     
     # Options read when launching programs locally with 
     # ./bin/run-example or ./bin/spark-submit
    +# - HADOOP_CONF_DIR, to point Spark towards Hadoop configuration files
    --- End diff --
    
    should this be under "Options read in YARN client mode"?


---
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: Assorted clean-up for Spark-on-YARN.

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

    https://github.com/apache/spark/pull/488#discussion_r11883901
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/SparkSubmitArguments.scala ---
    @@ -116,6 +116,17 @@ private[spark] class SparkSubmitArguments(args: Array[String]) {
         if (args.length == 0) printUsageAndExit(-1)
         if (primaryResource == null) SparkSubmit.printErrorAndExit("Must specify a primary resource")
         if (mainClass == null) SparkSubmit.printErrorAndExit("Must specify a main class with --class")
    +    val testing = sys.env.contains("SPARK_TESTING")
    +    if (master.startsWith("yarn")) {
    +      val hasHadoopEnv = testing ||
    +        sys.env.contains("HADOOP_CONF_DIR") ||
    +        sys.env.contains("YARN_CONF_DIR")
    +
    +      if (!hasHadoopEnv) {
    --- End diff --
    
    Ah that makes way more sense. Thanks


---
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: Assorted clean-up for Spark-on-YARN.

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

    https://github.com/apache/spark/pull/488#issuecomment-41114194
  
    +1
    
    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: Assorted clean-up for Spark-on-YARN.

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

    https://github.com/apache/spark/pull/488#issuecomment-41115829
  
    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: Assorted clean-up for Spark-on-YARN.

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

    https://github.com/apache/spark/pull/488#discussion_r11882653
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/SparkSubmitArguments.scala ---
    @@ -116,6 +116,17 @@ private[spark] class SparkSubmitArguments(args: Array[String]) {
         if (args.length == 0) printUsageAndExit(-1)
         if (primaryResource == null) SparkSubmit.printErrorAndExit("Must specify a primary resource")
         if (mainClass == null) SparkSubmit.printErrorAndExit("Must specify a main class with --class")
    +    val testing = sys.env.contains("SPARK_TESTING")
    +    if (master.startsWith("yarn")) {
    +      val hasHadoopEnv = testing ||
    +        sys.env.contains("HADOOP_CONF_DIR") ||
    +        sys.env.contains("YARN_CONF_DIR")
    +
    +      if (!hasHadoopEnv) {
    --- End diff --
    
    super small nit: I meant something more like `if (!hasHadoopEnv && !testing)` here, since the variable `hasHadoopEnv` should really not depend on whether we're testing Spark or not.


---
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: Assorted clean-up for Spark-on-YARN.

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

    https://github.com/apache/spark/pull/488#issuecomment-41102987
  
     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: Assorted clean-up for Spark-on-YARN.

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

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


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