You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by pmackles <gi...@git.apache.org> on 2017/10/20 15:12:38 UTC

[GitHub] spark pull request #19543: [SPARK-19606][MESOS] Support constraints in spark...

GitHub user pmackles opened a pull request:

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

    [SPARK-19606][MESOS] Support constraints in spark-dispatcher

    ## What changes were proposed in this pull request?
    
    A discussed in SPARK-19606, the addition of a new config property named "spark.mesos.constraints.driver" for constraining drivers running on a Mesos cluster
    
    ## How was this patch tested?
    
    Corresponding unit test added also tested locally on a Mesos cluster
    
    Please review http://spark.apache.org/contributing.html before opening a pull request.


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

    $ git pull https://github.com/pmackles/spark SPARK-19606

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

    https://github.com/apache/spark/pull/19543.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 #19543
    
----
commit 11d58593edd43b651bdbe5c269fc051a94269747
Author: Paul Mackles <pm...@adobe.com>
Date:   2017-10-20T15:08:33Z

    [SPARK-19606] Support constraints in spark-dispatcher

----


---

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


[GitHub] spark issue #19543: [SPARK-19606][MESOS] Support constraints in spark-dispat...

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

    https://github.com/apache/spark/pull/19543
  
    @susanxhuynh, @ttashi-rms, @ArtRand please take a look


---

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


[GitHub] spark pull request #19543: [SPARK-19606][MESOS] Support constraints in spark...

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

    https://github.com/apache/spark/pull/19543#discussion_r150097549
  
    --- Diff: docs/running-on-mesos.md ---
    @@ -458,6 +461,14 @@ See the [configuration page](configuration.html) for information on Spark config
       </td>
     </tr>
     <tr>
    +  <td><code>spark.mesos.driver.constraints</code></td>
    +  <td>(none)</td>
    +  <td>
    +    Same as <code>spark.mesos.constraints</code> except applied to drivers when launched through the dispatcher. By default,
    +    all resource offers will be accepted.
    --- End diff --
    
    Maybe clarify in the description for `spark.mesos.constraints` in the above cell that it only applies to executors.


---

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


[GitHub] spark issue #19543: [SPARK-19606][MESOS] Support constraints in spark-dispat...

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

    https://github.com/apache/spark/pull/19543
  
    LGTM


---

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


[GitHub] spark issue #19543: [SPARK-19606][MESOS] Support constraints in spark-dispat...

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

    https://github.com/apache/spark/pull/19543
  
    thanks @susanxhuynh 
    merged this to master.
    the cherry pick to 2.2 was non-trivial, but merged, please keep an eye for this and please help test 2.2.1!



---

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


[GitHub] spark pull request #19543: [SPARK-19606][MESOS] Support constraints in spark...

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

    https://github.com/apache/spark/pull/19543#discussion_r150101873
  
    --- Diff: resource-managers/mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosClusterScheduler.scala ---
    @@ -556,7 +556,8 @@ private[spark] class MesosClusterScheduler(
     
       private class ResourceOffer(
           val offer: Offer,
    -      var remainingResources: JList[Resource]) {
    +      var remainingResources: JList[Resource],
    +      var attributes: JList[Attribute]) {
         override def toString(): String = {
           s"Offer id: ${offer.getId}, resources: ${remainingResources}"
    --- End diff --
    
    Include the `attributes` in this string?


---

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


[GitHub] spark issue #19543: [SPARK-19606][MESOS] Support constraints in spark-dispat...

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

    https://github.com/apache/spark/pull/19543
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/82963/
    Test PASSed.


---

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


[GitHub] spark issue #19543: [SPARK-19606][MESOS] Support constraints in spark-dispat...

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

    https://github.com/apache/spark/pull/19543
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/82937/
    Test FAILed.


---

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


[GitHub] spark issue #19543: [SPARK-19606][MESOS] Support constraints in spark-dispat...

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

    https://github.com/apache/spark/pull/19543
  
    @felixcheung - fixed scala-style issues and also updated the docs to include the new property


---

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


[GitHub] spark issue #19543: [SPARK-19606][MESOS] Support constraints in spark-dispat...

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

    https://github.com/apache/spark/pull/19543
  
    **[Test build #83718 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/83718/testReport)** for PR 19543 at commit [`158b6b9`](https://github.com/apache/spark/commit/158b6b998bd774f52430d42791e6e21a0537a110).


---

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


[GitHub] spark issue #19543: [SPARK-19606][MESOS] Support constraints in spark-dispat...

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

    https://github.com/apache/spark/pull/19543
  
    @ttashi-rms v2.2 and up


---

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


[GitHub] spark issue #19543: [SPARK-19606][MESOS] Support constraints in spark-dispat...

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

    https://github.com/apache/spark/pull/19543
  
    @susanxhuynh would you like to review?
    also looks like @ArtRand has some comments


---

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


[GitHub] spark issue #19543: [SPARK-19606][MESOS] Support constraints in spark-dispat...

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

    https://github.com/apache/spark/pull/19543
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #19543: [SPARK-19606][MESOS] Support constraints in spark-dispat...

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

    https://github.com/apache/spark/pull/19543
  
    **[Test build #82937 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/82937/testReport)** for PR 19543 at commit [`11d5859`](https://github.com/apache/spark/commit/11d58593edd43b651bdbe5c269fc051a94269747).
     * This patch **fails Scala style tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #19543: [SPARK-19606][MESOS] Support constraints in spark-dispat...

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

    https://github.com/apache/spark/pull/19543
  
    @pmackles your changes works great. we had to update SJS (spark-job-server) side to support the new param for dispatcher. Ended up updating the manager_start.sh incase anyone is trying to figure it out.


---

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


[GitHub] spark issue #19543: [SPARK-19606][MESOS] Support constraints in spark-dispat...

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

    https://github.com/apache/spark/pull/19543
  
    **[Test build #82963 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/82963/testReport)** for PR 19543 at commit [`c587946`](https://github.com/apache/spark/commit/c587946a03ade7c4f56864e0c0d2c3552d0e6b80).


---

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


[GitHub] spark issue #19543: [SPARK-19606][MESOS] Support constraints in spark-dispat...

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

    https://github.com/apache/spark/pull/19543
  
    @susanxhuynh or anyone from the mesos side would you please review?



---

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


[GitHub] spark issue #19543: [SPARK-19606][MESOS] Support constraints in spark-dispat...

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

    https://github.com/apache/spark/pull/19543
  
    @ArtRand - thanks for the feedback. I made the suggested changes to the docs and added some more tests - including a test w/ multiple constraints


---

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


[GitHub] spark issue #19543: [SPARK-19606][MESOS] Support constraints in spark-dispat...

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

    https://github.com/apache/spark/pull/19543
  
    **[Test build #82963 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/82963/testReport)** for PR 19543 at commit [`c587946`](https://github.com/apache/spark/commit/c587946a03ade7c4f56864e0c0d2c3552d0e6b80).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #19543: [SPARK-19606][MESOS] Support constraints in spark-dispat...

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

    https://github.com/apache/spark/pull/19543
  
    test this please


---

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


[GitHub] spark issue #19543: [SPARK-19606][MESOS] Support constraints in spark-dispat...

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

    https://github.com/apache/spark/pull/19543
  
    add to white list


---

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


[GitHub] spark issue #19543: [SPARK-19606][MESOS] Support constraints in spark-dispat...

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

    https://github.com/apache/spark/pull/19543
  
    Merged build finished. Test FAILed.


---

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


[GitHub] spark issue #19543: [SPARK-19606][MESOS] Support constraints in spark-dispat...

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

    https://github.com/apache/spark/pull/19543
  
    @felixcheung - any chance of getting this merged into the upcoming 2.2.1 release? I cleaned up the merge conflict


---

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


[GitHub] spark issue #19543: [SPARK-19606][MESOS] Support constraints in spark-dispat...

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

    https://github.com/apache/spark/pull/19543
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/82946/
    Test FAILed.


---

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


[GitHub] spark issue #19543: [SPARK-19606][MESOS] Support constraints in spark-dispat...

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

    https://github.com/apache/spark/pull/19543
  
    **[Test build #82937 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/82937/testReport)** for PR 19543 at commit [`11d5859`](https://github.com/apache/spark/commit/11d58593edd43b651bdbe5c269fc051a94269747).


---

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


[GitHub] spark issue #19543: [SPARK-19606][MESOS] Support constraints in spark-dispat...

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

    https://github.com/apache/spark/pull/19543
  
    **[Test build #82946 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/82946/testReport)** for PR 19543 at commit [`efdc09c`](https://github.com/apache/spark/commit/efdc09c20aaffe56d7b214f2e54db39afd66374f).
     * This patch **fails Scala style tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #19543: [SPARK-19606][MESOS] Support constraints in spark-dispat...

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

    https://github.com/apache/spark/pull/19543
  
    My apologies. Reread the docs and ran style checks locally this time. Fingers crossed


---

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


[GitHub] spark issue #19543: [SPARK-19606][MESOS] Support constraints in spark-dispat...

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

    https://github.com/apache/spark/pull/19543
  
    **[Test build #83718 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/83718/testReport)** for PR 19543 at commit [`158b6b9`](https://github.com/apache/spark/commit/158b6b998bd774f52430d42791e6e21a0537a110).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #19543: [SPARK-19606][MESOS] Support constraints in spark-dispat...

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

    https://github.com/apache/spark/pull/19543
  
    Can one of the admins verify this patch?


---

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


[GitHub] spark pull request #19543: [SPARK-19606][MESOS] Support constraints in spark...

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

    https://github.com/apache/spark/pull/19543#discussion_r146971307
  
    --- Diff: docs/running-on-mesos.md ---
    @@ -458,6 +461,14 @@ See the [configuration page](configuration.html) for information on Spark config
       </td>
     </tr>
     <tr>
    +  <td><code>spark.mesos.driver.constraints</code></td>
    +  <td>(none)</td>
    +  <td>
    +    Same as <code>spark.mesos.constraints</code> except applied to drivers when launched through the dispatcher. By default,
    +    all resource offers will be accepted.
    --- End diff --
    
    maybe "all resource offers _with sufficient resources_ will be accepted" ?


---

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


[GitHub] spark issue #19543: [SPARK-19606][MESOS] Support constraints in spark-dispat...

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

    https://github.com/apache/spark/pull/19543
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/83718/
    Test PASSed.


---

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


[GitHub] spark pull request #19543: [SPARK-19606][MESOS] Support constraints in spark...

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

    https://github.com/apache/spark/pull/19543#discussion_r150419093
  
    --- Diff: resource-managers/mesos/src/main/scala/org/apache/spark/deploy/mesos/config.scala ---
    @@ -122,4 +122,11 @@ package object config {
             "Example: key1:val1,key2:val2")
           .stringConf
           .createOptional
    +
    +  private[spark] val DRIVER_CONSTRAINTS =
    +    ConfigBuilder("spark.mesos.driver.constraints")
    +      .doc("Attribute based constraints on mesos resource offers. Applied by the dispatcher " +
    +        "when launching drivers. Default is to accept all offers with sufficient resources.")
    +      .stringConf
    +      .createWithDefault("")
    --- End diff --
    
    @felixcheung I think it's okay. There's a utility function, `parseConstraintString`, which parses the input string into a Map. If the string is empty, it returns an empty Map:
    https://github.com/apache/spark/blob/fc45c2c88a838b8f46659ebad2a8f3a9923bc95f/resource-managers/mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerUtils.scala#L321
    This is also consistent with how the executor constraint string is parsed.


---

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


[GitHub] spark issue #19543: [SPARK-19606][MESOS] Support constraints in spark-dispat...

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

    https://github.com/apache/spark/pull/19543
  
    Jenkins, retest this please


---

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


[GitHub] spark issue #19543: [SPARK-19606][MESOS] Support constraints in spark-dispat...

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

    https://github.com/apache/spark/pull/19543
  
    **[Test build #82946 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/82946/testReport)** for PR 19543 at commit [`efdc09c`](https://github.com/apache/spark/commit/efdc09c20aaffe56d7b214f2e54db39afd66374f).


---

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


[GitHub] spark issue #19543: [SPARK-19606][MESOS] Support constraints in spark-dispat...

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

    https://github.com/apache/spark/pull/19543
  
    which release version is this intended for ?


---

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


[GitHub] spark pull request #19543: [SPARK-19606][MESOS] Support constraints in spark...

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

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


---

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


[GitHub] spark issue #19543: [SPARK-19606][MESOS] Support constraints in spark-dispat...

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

    https://github.com/apache/spark/pull/19543
  
    Jenkins, retest this please


---

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


[GitHub] spark issue #19543: [SPARK-19606][MESOS] Support constraints in spark-dispat...

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

    https://github.com/apache/spark/pull/19543
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark pull request #19543: [SPARK-19606][MESOS] Support constraints in spark...

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

    https://github.com/apache/spark/pull/19543#discussion_r150376571
  
    --- Diff: resource-managers/mesos/src/main/scala/org/apache/spark/deploy/mesos/config.scala ---
    @@ -122,4 +122,11 @@ package object config {
             "Example: key1:val1,key2:val2")
           .stringConf
           .createOptional
    +
    +  private[spark] val DRIVER_CONSTRAINTS =
    +    ConfigBuilder("spark.mesos.driver.constraints")
    +      .doc("Attribute based constraints on mesos resource offers. Applied by the dispatcher " +
    +        "when launching drivers. Default is to accept all offers with sufficient resources.")
    +      .stringConf
    +      .createWithDefault("")
    --- End diff --
    
    should this be default to ""? looks like it might still match something
    https://github.com/apache/spark/blob/fc45c2c88a838b8f46659ebad2a8f3a9923bc95f/resource-managers/mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerUtils.scala#L267


---

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


[GitHub] spark pull request #19543: [SPARK-19606][MESOS] Support constraints in spark...

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

    https://github.com/apache/spark/pull/19543#discussion_r150100634
  
    --- Diff: resource-managers/mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosClusterScheduler.scala ---
    @@ -601,10 +602,14 @@ private[spark] class MesosClusterScheduler(
         for (submission <- candidates) {
           val driverCpu = submission.cores
           val driverMem = submission.mem
    -      logTrace(s"Finding offer to launch driver with cpu: $driverCpu, mem: $driverMem")
    +      val driverConstraints =
    +        parseConstraintString(submission.conf.get("spark.mesos.driver.constraints", ""))
    --- End diff --
    
    New config properties would ideally be defined in the `config` object: https://github.com/apache/spark/blob/master/resource-managers/mesos/src/main/scala/org/apache/spark/deploy/mesos/config.scala#L24 and referenced by the variable name.


---

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


[GitHub] spark issue #19543: [SPARK-19606][MESOS] Support constraints in spark-dispat...

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

    https://github.com/apache/spark/pull/19543
  
    Just one super-nit.


---

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


[GitHub] spark issue #19543: [SPARK-19606][MESOS] Support constraints in spark-dispat...

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

    https://github.com/apache/spark/pull/19543
  
    Merged build finished. Test FAILed.


---

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


[GitHub] spark issue #19543: [SPARK-19606][MESOS] Support constraints in spark-dispat...

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

    https://github.com/apache/spark/pull/19543
  
    LGTM. 


---

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


[GitHub] spark pull request #19543: [SPARK-19606][MESOS] Support constraints in spark...

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

    https://github.com/apache/spark/pull/19543#discussion_r146132173
  
    --- Diff: resource-managers/mesos/src/test/scala/org/apache/spark/scheduler/cluster/mesos/MesosClusterSchedulerSuite.scala ---
    @@ -254,6 +254,32 @@ class MesosClusterSchedulerSuite extends SparkFunSuite with LocalSparkContext wi
         assert(networkInfos.get(0).getLabels.getLabels(1).getValue == "val2")
       }
     
    +  test("declines offers that violate driver constraints") {
    +    setScheduler()
    +
    +    val mem = 1000
    +    val cpu = 1
    +    val s2Attributes = List(Utils.createTextAttribute("c", "u"))
    +
    +    val response = scheduler.submitDriver(
    +      new MesosDriverDescription("d1", "jar", mem, cpu, true,
    +        command,
    +        Map("spark.mesos.executor.home" -> "test",
    +          "spark.app.name" -> "test",
    +          "spark.mesos.driver.constraints" -> "c:v"),
    --- End diff --
    
    maybe test multiple constraints too? 


---

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


[GitHub] spark pull request #19543: [SPARK-19606][MESOS] Support constraints in spark...

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

    https://github.com/apache/spark/pull/19543#discussion_r146132144
  
    --- Diff: docs/running-on-mesos.md ---
    @@ -458,6 +461,13 @@ See the [configuration page](configuration.html) for information on Spark config
       </td>
     </tr>
     <tr>
    +  <td><code>spark.mesos.driver.constraints</code></td>
    +  <td>(none)</td>
    +  <td>
    +    Same as <code>spark.mesos.constraints</code> except applied to drivers.
    --- End diff --
    
    Maybe add the this is only valid when launching jobs with the Mesos Dispatcher? 


---

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


[GitHub] spark issue #19543: [SPARK-19606][MESOS] Support constraints in spark-dispat...

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

    https://github.com/apache/spark/pull/19543
  
    @susanxhuynh, @ttashi-rms, @ArtRand - thanks for the feedback. I was able to make all of the suggested changes.


---

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


[GitHub] spark issue #19543: [SPARK-19606][MESOS] Support constraints in spark-dispat...

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

    https://github.com/apache/spark/pull/19543
  
    Jenkins, retest this please


---

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