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

Guoqiang Li updated SPARK-3098:
-------------------------------

    Description: 
{code}
     val c = sc.parallelize(1 to 7899).flatMap { i =>
      (1 to 10000).toSeq.map(p => i * 6000 + p)
    }.distinct().zipWithIndex() 
    c.join(c).filter(t => t._2._1 != t._2._2).take(3)
{code}
 => 
{code}
 Array[(Int, (Long, Long))] = Array((1732608,(11,12)), (45515264,(12,13)), 
(36579712,(13,14)))
{code}

  was:
I do not know how to reproduce the bug.
This is the case. When I was in operating 10 billion data by groupByKey. the 
results error:
{noformat}
(4696501, 370568)
(4696501, 376672)
(4696501, 374880)
.....
(4696502, 350264)
(4696502, 358458)
(4696502, 398502)
......
{noformat} 
=> 
{noformat}
(4696501,ArrayBuffer(350264, 358458, 398502 ........)), 
(4696502,ArrayBuffer(376621, ......))
{noformat}

code :
{code}
    val dealOuts = clickPreferences(sc, dealOutPath, periodTime)
    val dealOrders = orderPreferences(sc, dealOrderPath, periodTime)
    val favorites = favoritePreferences(sc, favoritePath, periodTime)
    val allBehaviors = (dealOrders ++ favorites ++ dealOuts)
    val peferences= allBehaviors.groupByKey().map { ... } 
{code}

spark-defaults.conf:
{code}
spark.default.parallelism    280
{code}


>  In some cases, operation zipWithIndex get a wrong results
> ----------------------------------------------------------
>
>                 Key: SPARK-3098
>                 URL: https://issues.apache.org/jira/browse/SPARK-3098
>             Project: Spark
>          Issue Type: Bug
>          Components: Spark Core
>    Affects Versions: 1.0.1
>            Reporter: Guoqiang Li
>            Priority: Critical
>
> {code}
>      val c = sc.parallelize(1 to 7899).flatMap { i =>
>       (1 to 10000).toSeq.map(p => i * 6000 + p)
>     }.distinct().zipWithIndex() 
>     c.join(c).filter(t => t._2._1 != t._2._2).take(3)
> {code}
>  => 
> {code}
>  Array[(Int, (Long, Long))] = Array((1732608,(11,12)), (45515264,(12,13)), 
> (36579712,(13,14)))
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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

Reply via email to