Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/931#discussion_r13877376
--- Diff:
core/src/main/scala/org/apache/spark/rdd/OrderedRDDFunctions.scala ---
@@ -41,30 +45,92 @@ import org.apache.spark.{Logging, RangePartitioner}
* rdd.sortByKey()
* }}}
*/
+
class OrderedRDDFunctions[K : Ordering : ClassTag,
V: ClassTag,
P <: Product2[K, V] : ClassTag](
- self: RDD[P])
- extends Logging with Serializable {
+ self: RDD[P])
+extends Logging with Serializable {
private val ordering = implicitly[Ordering[K]]
+ private type SortCombiner = ArrayBuffer[V]
/**
- * Sort the RDD by key, so that each partition contains a sorted range
of the elements. Calling
- * `collect` or `save` on the resulting RDD will return or output an
ordered list of records
- * (in the `save` case, they will be written to multiple `part-X` files
in the filesystem, in
- * order of the keys).
- */
+ * Sort the RDD by key, so that each partition contains a sorted range
of the elements. Calling
+ * `collect` or `save` on the resulting RDD will return or output an
ordered list of records
+ * (in the `save` case, they will be written to multiple `part-X` files
in the filesystem, in
+ * order of the keys).
--- End diff --
nit: indentation weird
---
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.
---