You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by ConeyLiu <gi...@git.apache.org> on 2017/05/04 07:57:17 UTC

[GitHub] spark pull request #17859: [SPARK-20595][Deploy]Parse the 'SPARK_EXECUTOR_IN...

GitHub user ConeyLiu opened a pull request:

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

    [SPARK-20595][Deploy]Parse the 'SPARK_EXECUTOR_INSTANCES' into the parsed arguments

    ## What changes were proposed in this pull request?
    
    Currently, when we set the parameter `SPARK_EXECUTOR_INSTANCES` in the `spark-env.sh`, it seems that the parameter doesn't parsed by Spark. So this patch parse the 'SPARK_EXECUTOR_INSTANCES' into the parsed arguments.
    
    ## How was this patch tested?
    
    Existing tests.

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

    $ git pull https://github.com/ConeyLiu/spark build

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

    https://github.com/apache/spark/pull/17859.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 #17859
    
----
commit f98ee8f6d92a81e996e1a610c8535b0e4b96c341
Author: Xianyang Liu <xi...@intel.com>
Date:   2017-05-04T07:23:20Z

    add option which parse the executor numbers from env

----


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #17859: [SPARK-20595][Deploy]Parse the 'SPARK_EXECUTOR_INSTANCES...

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

    https://github.com/apache/spark/pull/17859
  
    This was intentionally removed. Env-based configs have been deprecated for a long time, and some were already removed. Use a proper configuration file (or command line option) for that. See SPARK-17979.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #17859: [SPARK-20595][Deploy]Parse the 'SPARK_EXECUTOR_INSTANCES...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on the issue:

    https://github.com/apache/spark/pull/17859
  
    No, I believe that only exists for 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.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #17859: [SPARK-20595][Deploy]Parse the 'SPARK_EXECUTOR_INSTANCES...

Posted by ConeyLiu <gi...@git.apache.org>.
Github user ConeyLiu commented on the issue:

    https://github.com/apache/spark/pull/17859
  
    Hi @srowen, the follow is the test result, the submit script: `./spark-submit --class org.apache.spark.examples.SparkPi --master yarn --deploy-mode client --verbose ../examples/target/scala-2.11/jars/spark-examples_2.11-2.2.0-SNAPS
    HOT.jar 10`:
    before:
    ```
    Parsed arguments:
      master                  yarn
      deployMode              client
      executorMemory          1G
      executorCores           1
      totalExecutorCores      null
      propertiesFile          null
      driverMemory            null
      driverCores             null
      driverExtraClassPath    null
      driverExtraLibraryPath  null
      driverExtraJavaOptions  null
      supervise               false
      queue                   null
      numExecutors            null
      files                   null
      pyFiles                 null
      archives                null
      mainClass               org.apache.spark.examples.SparkPi
      primaryResource         file:/Users/lxy/git_repository/spark/bin/../examples/target/scala-2.11/jars/spark-examples_2.11-2.2.0-SNAPSHOT.jar
      name                    org.apache.spark.examples.SparkPi
      childArgs               [10]
      jars                    null
      packages                null
      packagesExclusions      null
      repositories            null
      verbose                 true
    ```
    after
    ```
    Parsed arguments:
      master                  yarn
      deployMode              client
      executorMemory          1G
      executorCores           1
      totalExecutorCores      null
      propertiesFile          null
      driverMemory            null
      driverCores             null
      driverExtraClassPath    null
      driverExtraLibraryPath  null
      driverExtraJavaOptions  null
      supervise               false
      queue                   null
      numExecutors            2
      files                   null
      pyFiles                 null
      archives                null
      mainClass               org.apache.spark.examples.SparkPi
      primaryResource         file:/Users/lxy/git_repository/spark/bin/../examples/target/scala-2.11/jars/spark-examples_2.11-2.2.0-SNAPSHOT.jar
      name                    org.apache.spark.examples.SparkPi
      childArgs               [10]
      jars                    null
      packages                null
      packagesExclusions      null
      repositories            null
      verbose                 true
    ```
    
    And also this parameter doesn't affect other `ClusterManager`. You can see the follow code:
    [L458](https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala#L458)


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #17859: [SPARK-20595][Deploy]Parse the 'SPARK_EXECUTOR_IN...

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

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


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #17859: [SPARK-20595][Deploy]Parse the 'SPARK_EXECUTOR_INSTANCES...

Posted by ConeyLiu <gi...@git.apache.org>.
Github user ConeyLiu commented on the issue:

    https://github.com/apache/spark/pull/17859
  
    Hi @vanzin, can you help to take a look? The affect of `spark.executor.instances` changed after [SPARK-9092](https://github.com/apache/spark/pull/7657), but the comments in the config template didn't change corresponding. If this parameter is deprecated? Thanks a lot.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #17859: [SPARK-20595][Deploy]Parse the 'SPARK_EXECUTOR_INSTANCES...

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

    https://github.com/apache/spark/pull/17859
  
    Can one of the admins verify this 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.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #17859: [SPARK-20595][Deploy]Parse the 'SPARK_EXECUTOR_INSTANCES...

Posted by ConeyLiu <gi...@git.apache.org>.
Github user ConeyLiu commented on the issue:

    https://github.com/apache/spark/pull/17859
  
    Ok, I will open another pr to remove it. Thanks a lot both of you.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #17859: [SPARK-20595][Deploy]Parse the 'SPARK_EXECUTOR_INSTANCES...

Posted by ConeyLiu <gi...@git.apache.org>.
Github user ConeyLiu commented on the issue:

    https://github.com/apache/spark/pull/17859
  
    @vanzin Thanks a lot for you review. Do we need remove the comments from template config?  It doesn't work anymore in current version. 


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #17859: [SPARK-20595][Deploy]Parse the 'SPARK_EXECUTOR_INSTANCES...

Posted by ConeyLiu <gi...@git.apache.org>.
Github user ConeyLiu commented on the issue:

    https://github.com/apache/spark/pull/17859
  
    @srowen @HyukjinKwon Can you take a look, thanks a lot.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #17859: [SPARK-20595][Deploy]Parse the 'SPARK_EXECUTOR_INSTANCES...

Posted by ConeyLiu <gi...@git.apache.org>.
Github user ConeyLiu commented on the issue:

    https://github.com/apache/spark/pull/17859
  
    It only affect the YARN mode, just see the follow code:
    ```
    OptionAssigner(args.numExecutors, YARN, ALL_DEPLOY_MODES, sysProp = "spark.executor.instances"),
    ```
    
    But from now latest code, this parameter affect both `YARN client` & `YARN cluster`, this change after [SPARK-9092](https://github.com/apache/spark/pull/7657), but the comment in the config template didn't make the corresponding changes.
    
    And also, this parameter is set in `spark-env.sh`, so it can only can be fetched by the method 
     of `env.get()` according to the class of `SparkSubmitArguments`. However, now the parameter is set by the follow code:
    ```
    numExecutors = Option(numExecutors)
          .getOrElse(sparkProperties.get("spark.executor.instances").orNull)
    ```
    So only you set it in by `--num-executors` or defined the configure(`spark-default.conf` or `--conf`).


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #17859: [SPARK-20595][Deploy]Parse the 'SPARK_EXECUTOR_INSTANCES...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on the issue:

    https://github.com/apache/spark/pull/17859
  
    This change causes it to affect all usages of spark-submit right? if you look at the comment about it in the config template, it suggests it is for YARN client mode only. I don't know the history of this value and it may be obsolete and for backwards compatibility, but, I am not clear that it should be used this way, no.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #17859: [SPARK-20595][Deploy]Parse the 'SPARK_EXECUTOR_INSTANCES...

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

    https://github.com/apache/spark/pull/17859
  
    > Do we need remove the comments from template config?
    
    Ah, that would be a good idea. I also noticed it's still used in `YarnSparkHadoopUtil.scala`, so that could be removed too.
    
    I also took a closer look at SPARK-17979 and this particular env variable wasn't removed in that change; seems it was removed much earlier (SPARK-9092 as far as I can tell), so looks it isn't very widely used.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org