Github user skonto commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19390#discussion_r147370285
  
    --- Diff: 
resource-managers/mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerUtils.scala
 ---
    @@ -427,10 +441,10 @@ trait MesosSchedulerUtils extends Logging {
           // partition port offers
           val (resourcesWithoutPorts, portResources) = 
filterPortResources(offeredResources)
     
    -      val portsAndRoles = requestedPorts.
    -        map(x => (x, findPortAndGetAssignedRangeRole(x, portResources)))
    +      val portsAndResourceInfo = requestedPorts.
    --- End diff --
    
    A few before that method is called we check the ports available in 
canLaunchTask. If constraints are not met we decline the offer. The reason is 
that the ports passed at the config were passed by the user (eg. an operator) 
who knows what he is doing. The issue is that this way if there is no network 
isolation you get one executor per node. 


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to