Github user mridulm commented on the issue:
https://github.com/apache/spark/pull/16867
You are right, the strict definition requires us to average - it just makes
it difficult to reason based on logs at times when the duration mentioned
does not exist when there are discontinuities :-)
(currently, it is simple 2/3 * threshold if we want to narrow down spec
exec task triggers)
On Mon, Mar 6, 2017 at 12:00 PM, Kay Ousterhout <[email protected]>
wrote:
> *@kayousterhout* commented on this pull request.
> ------------------------------
>
> In core/src/main/scala/org/apache/spark/util/collection/MedianHeap.scala
> <https://github.com/apache/spark/pull/16867#discussion_r104508178>:
>
> > + private[this] def rebalance(): Unit = {
> + if (minHeap.size - maxHeap.size > 1) {
> + maxHeap.enqueue(minHeap.dequeue())
> + }
> + if (maxHeap.size - minHeap.size > 1) {
> + minHeap.enqueue(maxHeap.dequeue)
> + }
> + }
> +
> + // Returns the median of the numbers.
> + def findMedian(): Double = {
> + if (isEmpty) {
> + throw new NoSuchElementException("MedianHeap is empty.")
> + }
> + if (minHeap.size == maxHeap.size) {
> + (minHeap.head + maxHeap.head) / 2.0
>
> @mridulm <https://github.com/mridulm> it seems like we should be using
> the traditional definition of the median here, as and not what you would
> prefer that the definition of the median was!
>
> â
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/apache/spark/pull/16867#discussion_r104508178>, or
mute
> the thread
>
<https://github.com/notifications/unsubscribe-auth/ABhJlG7gYU0xmtEwNYCGrXyPqnMkmAQ8ks5rjGXzgaJpZM4L70GU>
> .
>
---
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]