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

    https://github.com/apache/spark/pull/8340#discussion_r37599615
  
    --- Diff: 
streaming/src/main/scala/org/apache/spark/streaming/scheduler/ReceiverSchedulingPolicy.scala
 ---
    @@ -144,27 +141,31 @@ private[streaming] class ReceiverSchedulingPolicy {
         val scheduledExecutors = mutable.Set[String]()
         scheduledExecutors ++= preferredLocation
     
    -    val executorWeights = receiverTrackingInfoMap.values.flatMap { 
receiverTrackingInfo =>
    -      receiverTrackingInfo.state match {
    -        case ReceiverState.INACTIVE => Nil
    -        case ReceiverState.SCHEDULED =>
    -          val scheduledExecutors = 
receiverTrackingInfo.scheduledExecutors.get
    -          // The probability that a scheduled receiver will run in an 
executor is
    -          // 1.0 / scheduledLocations.size
    -          scheduledExecutors.map(location => location -> (1.0 / 
scheduledExecutors.size))
    -        case ReceiverState.ACTIVE => 
Seq(receiverTrackingInfo.runningExecutor.get -> 1.0)
    -      }
    +    val executorWeights = receiverTrackingInfoMap.filter(_._1 != 
receiverId).values.flatMap {
    --- End diff --
    
    Could you add an explanation of why we are filtering?



---
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 [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to