Github user mengxr commented on a diff in the pull request:
https://github.com/apache/spark/pull/423#discussion_r12080023
--- Diff: core/src/main/scala/org/apache/spark/api/java/JavaRDDLike.scala
---
@@ -263,6 +263,26 @@ trait JavaRDDLike[T, This <: JavaRDDLike[T, This]]
extends Serializable {
rdd.zipPartitions(other.rdd)(fn)(other.classTag,
fakeClassTag[V]))(fakeClassTag[V])
}
+ /**
+ * Zips this RDD with generated unique Long ids. Items in the kth
partition will get ids k, n+k,
+ * 2*n+k, ..., where n is the number of partitions. So there may exist
gaps, but this method
+ * won't trigger a spark job, which is different from
[[org.apache.spark.rdd.RDD#zipWithIndex]].
+ */
+ def zipWithUniqueId[Long](): JavaPairRDD[T, Long] = {
--- End diff --
Just saw this. Why do you need `[Long]` here?
---
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.
---