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

    https://github.com/apache/spark/pull/3633#discussion_r21565347
  
    --- Diff: core/src/main/scala/org/apache/spark/rdd/CoalescedRDD.scala ---
    @@ -55,9 +54,11 @@ private[spark] case class CoalescedRDDPartition(
        * @return locality of this coalesced partition between 0 and 1
        */
       def localFraction: Double = {
    -    val loc = parents.count(p =>
    -      rdd.context.getPreferredLocs(rdd, p.index).map(tl => 
tl.host).contains(preferredLocation))
    -
    +    val loc = parents.count { p =>
    --- End diff --
    
    Ah, just saw the comment from your earlier discussion with @dgshep on one 
of the earlier commits.  Yeah, I see now that `exists` isn't a loop.  Feel free 
to ignore this comment unless you think my version is more readable.


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