Github user patmcdonough commented on a diff in the pull request:
https://github.com/apache/spark/pull/2447#discussion_r17794069
--- Diff: core/src/main/scala/org/apache/spark/rdd/RDD.scala ---
@@ -208,6 +208,23 @@ abstract class RDD[T: ClassTag](
}
/**
+ * Get the number of partitions in this RDD
+ *
+ * {{{
+ * scala> val rdd = sc.parallelize(1 to 4, 2)
+ * rdd: org.apache.spark.rdd.RDD[Int] = ParallelCollectionRDD[1] at
parallelize at <console>:12
+ *
+ * scala> rdd.getNumPartitions
+ * res1: Int = 2
+ * }}}
--- End diff --
Good point, although it's worth noting this was essentially ported directly
from the python API (including the doc). Any doc changes should be consistent
across both versions if possible.
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]