Repository navigation
Conversation
|
Can one of the admins verify this patch? |
There was a problem hiding this comment.
Should test with more than one partitions.
There was a problem hiding this comment.
You should use a list or an Array instead of a set here, because you want to assert on the exact order.
Also, use L instead of l.
|
Jenkins, test this please. |
|
Merged build triggered. |
|
Merged build started. |
|
Merged build finished. All automated tests passed. |
|
All automated tests passed. |
There was a problem hiding this comment.
Just saw this. Why do you need [Long] here?
There was a problem hiding this comment.
When remove the [Long]. The type of return value is JavaPairRDD<T,Object>
There was a problem hiding this comment.
def zipWithUniqueId(): JavaPairRDD[T, Long]
would return JavaPairRDD<T, Object>?
There was a problem hiding this comment.
@mengxr already found this out - but the reason is you'd want to declare the type as java.lang.Double instead of Long.
There was a problem hiding this comment.
basically what you created here is a type parameter named "Long" (surprisingly not a keyword in Scala), and you got the compiler to infer the type when you were calling it from Java.
There was a problem hiding this comment.
Try:
def zipWithUniqueId(): JavaPairRDD[T, java.lang.Long] = {
JavaPairRDD.fromRDD(rdd.zipWithUniqueId().map(x => (x._1, new java.lang.Long(x._2))))
There was a problem hiding this comment.
def zipWithUniqueId(): JavaPairRDD[T, JLong] = {
JavaPairRDD.fromRDD(rdd.zipWithUniqueId()).asInstanceOf[JavaPairRDD[T, JLong]]
} is better?
There was a problem hiding this comment.
let's just put java.lang.Long. It is not that "long" anyway.
|
LGTM if Jenkins is happy. |
|
Jenkins, test this please. |
|
Merged build triggered. |
|
Merged build started. |
|
Merged build finished. All automated tests passed. |
|
All automated tests passed. |
|
Thanks. I've merged this. |
Author: witgo <witgo@qq.com> Closes #423 from witgo/zipWithIndex and squashes the following commits: 039ec04 [witgo] Merge branch 'master' of https://github.com/apache/spark into zipWithIndex 24d74c9 [witgo] review commit 763a5e4 [witgo] Merge branch 'master' of https://github.com/apache/spark into zipWithIndex 59747d1 [witgo] review commit 7bf4d06 [witgo] Merge branch 'master' of https://github.com/apache/spark into zipWithIndex daa8f84 [witgo] review commit 4070613 [witgo] Merge branch 'master' of https://github.com/apache/spark into zipWithIndex 18e6c97 [witgo] java api zipWithIndex test 11e2e7f [witgo] add zipWithIndex zipWithUniqueId methods to java api (cherry picked from commit 7d15058) Signed-off-by: Reynold Xin <rxin@apache.org>
Improving the graphx-programming-guide This PR will track a few minor improvements to the content and formatting of the graphx-programming-guide.
Author: witgo <witgo@qq.com> Closes apache#423 from witgo/zipWithIndex and squashes the following commits: 039ec04 [witgo] Merge branch 'master' of https://github.com/apache/spark into zipWithIndex 24d74c9 [witgo] review commit 763a5e4 [witgo] Merge branch 'master' of https://github.com/apache/spark into zipWithIndex 59747d1 [witgo] review commit 7bf4d06 [witgo] Merge branch 'master' of https://github.com/apache/spark into zipWithIndex daa8f84 [witgo] review commit 4070613 [witgo] Merge branch 'master' of https://github.com/apache/spark into zipWithIndex 18e6c97 [witgo] java api zipWithIndex test 11e2e7f [witgo] add zipWithIndex zipWithUniqueId methods to java api
Improving the graphx-programming-guide This PR will track a few minor improvements to the content and formatting of the graphx-programming-guide. (cherry picked from commit 3fcc68b) Signed-off-by: Reynold Xin <rxin@apache.org>
…lish-fix Ensure bintray upload happens before repository is no clean.
No description provided.