spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Qiping Li (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SPARK-7181) External Sorter merge with aggregation go to an infinite loop when we have a total ordering
Date Tue, 28 Apr 2015 06:23:06 GMT

     [ https://issues.apache.org/jira/browse/SPARK-7181?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Qiping Li updated SPARK-7181:
-----------------------------
    Description: 
In the function {{mergeWithAggregation}} of {{ExternalSorter.scala}}, when there is a total
ordering for keys K, values of the same key in the sorted iterator should be combined. Currently
this is done by this:

{code}
  val elem = sorted.next()
  val k = elem._1
  var c = elem._2
  while (sorted.hasNext && sorted.head._1 == k) {
    c = mergeCombiners(c, sorted.head._2)
  }
{code}

This will go to an infinite loop when there are more than 1 values with the same key. `sorted.next()`
should be called to fix this.

  was:
In the function {{mergeWithAggregation}} of {{ExternalSorter.scala}}, when there is a total
ordering for keys K, values of the same key in the sorted iterator should be combined. Currently
this is done by this:

{code}
  val elem = sorted.next()
  val k = elem._1
  var c = elem._2
  while (sorted.hasNext && sorted.head._1 == k) {
    c = mergeCombiners(c, sorted.head._2)
  }
{code}

This will go to an infinity loop when there are more than 1 values with the same key. `sorted.next()`
should be called to fix this.


> External Sorter merge with aggregation go to an infinite loop when we have a total ordering
> -------------------------------------------------------------------------------------------
>
>                 Key: SPARK-7181
>                 URL: https://issues.apache.org/jira/browse/SPARK-7181
>             Project: Spark
>          Issue Type: Bug
>          Components: Spark Core
>    Affects Versions: 1.3.1
>            Reporter: Qiping Li
>            Priority: Critical
>             Fix For: 1.3.2, 1.4.0
>
>
> In the function {{mergeWithAggregation}} of {{ExternalSorter.scala}}, when there is a
total ordering for keys K, values of the same key in the sorted iterator should be combined.
Currently this is done by this:
> {code}
>   val elem = sorted.next()
>   val k = elem._1
>   var c = elem._2
>   while (sorted.hasNext && sorted.head._1 == k) {
>     c = mergeCombiners(c, sorted.head._2)
>   }
> {code}
> This will go to an infinite loop when there are more than 1 values with the same key.
`sorted.next()` should be called to fix this.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message