@@ -493,9 +493,9 @@ trait JavaRDDLike[T, This <: JavaRDDLike[T, This]] extends Serializable {
493
493
}
494
494
495
495
/**
496
- * Returns the top K elements from this RDD as defined by
496
+ * Returns the top k (largest) elements from this RDD as defined by
497
497
* the specified Comparator[T].
498
- * @param num the number of top elements to return
498
+ * @param num k, the number of top elements to return
499
499
* @param comp the comparator that defines the order
500
500
* @return an array of top elements
501
501
*/
@@ -507,9 +507,9 @@ trait JavaRDDLike[T, This <: JavaRDDLike[T, This]] extends Serializable {
507
507
}
508
508
509
509
/**
510
- * Returns the top K elements from this RDD using the
510
+ * Returns the top k (largest) elements from this RDD using the
511
511
* natural ordering for T.
512
- * @param num the number of top elements to return
512
+ * @param num k, the number of top elements to return
513
513
* @return an array of top elements
514
514
*/
515
515
def top (num : Int ): JList [T ] = {
@@ -518,9 +518,9 @@ trait JavaRDDLike[T, This <: JavaRDDLike[T, This]] extends Serializable {
518
518
}
519
519
520
520
/**
521
- * Returns the first K elements from this RDD as defined by
521
+ * Returns the first k (smallest) elements from this RDD as defined by
522
522
* the specified Comparator[T] and maintains the order.
523
- * @param num the number of top elements to return
523
+ * @param num k, the number of elements to return
524
524
* @param comp the comparator that defines the order
525
525
* @return an array of top elements
526
526
*/
@@ -552,9 +552,9 @@ trait JavaRDDLike[T, This <: JavaRDDLike[T, This]] extends Serializable {
552
552
}
553
553
554
554
/**
555
- * Returns the first K elements from this RDD using the
555
+ * Returns the first k (smallest) elements from this RDD using the
556
556
* natural ordering for T while maintain the order.
557
- * @param num the number of top elements to return
557
+ * @param num k, the number of top elements to return
558
558
* @return an array of top elements
559
559
*/
560
560
def takeOrdered (num : Int ): JList [T ] = {
0 commit comments