implicit final class MapPartitionWrapper[V] extends AnyVal
Maps partitions of RDDs in parallel.
- Alphabetic
- By Inheritance
- MapPartitionWrapper
- AnyVal
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new MapPartitionWrapper(rdd: RDD[V])
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- Any
- final def ##: Int
- Definition Classes
- Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def mapParallel[U](numThreads: Int)(f: (V) => U)(implicit arg0: ClassTag[U], vt: ClassTag[V]): RDD[U]
Applies map to an RDD, but it can use a thread pool if numThreads is >1, in that case partitions are computed in parallel.
Applies map to an RDD, but it can use a thread pool if numThreads is >1, in that case partitions are computed in parallel.
- U
the type of the new values
- numThreads
the number of threads to use for parallel invocations of f(). Can only be set to a value larger than 1 if the operations include IO operations, or if multiple cores are available per executor
- f
the mapping function, providing the new value for the element
- returns
an RDD with mapping function applied to each element
- Note
calling this function loses partitioning for key-value pair RDD
- def mapParallel[U](f: (V) => U, numThreads: Int)(implicit arg0: ClassTag[U], vt: ClassTag[V]): RDD[U]
Applies map to an RDD, but it can use a thread pool if numThreads is >1, in that case partitions are computed in parallel.
Applies map to an RDD, but it can use a thread pool if numThreads is >1, in that case partitions are computed in parallel.
- U
the type of the new values
- f
the mapping function, providing the new value for the element
- numThreads
the number of threads to use for parallel invocations of f(). Can only be set to a value larger than 1 if the operations include IO operations, or if multiple cores are available per executor
- returns
an RDD with mapping function applied to each element
- Note
calling this function loses partitioning for key-value pair RDD
- def mapParallelUnordered[U](numThreads: Int)(f: (V) => U)(implicit arg0: ClassTag[U], vt: ClassTag[V]): RDD[U]
Applies map to an RDD, but it can use a thread pool if numThreads is >1, in that case partitions are computed in parallel.
Applies map to an RDD, but it can use a thread pool if numThreads is >1, in that case partitions are computed in parallel. Elements are emitted as soon as they are ready, therefore it is possible that the transformed elements in each Spark partition are not in the same order as in the upstream RDD.
- U
the type of the new values
- numThreads
the number of threads to use for parallel invocations of f(). Can only be set to a value larger than 1 if the operations include IO operations, or if multiple cores are available per executor
- f
the mapping function, providing the new value for the element
- returns
an RDD with mapping function applied to each element
- Note
calling this function loses partitioning for key-value pair RDD
- def mapParallelUnordered[U](f: (V) => U, numThreads: Int)(implicit arg0: ClassTag[U], vt: ClassTag[V]): RDD[U]
Applies map to an RDD, but it can use a thread pool if numThreads is >1, in that case partitions are computed in parallel.
Applies map to an RDD, but it can use a thread pool if numThreads is >1, in that case partitions are computed in parallel. Elements are emitted as soon as they are ready, therefore it is possible that the transformed elements in each Spark partition are not in the same order as in the upstream RDD.
- U
the type of the new values
- f
the mapping function, providing the new value for the element
- numThreads
the number of threads to use for parallel invocations of f(). Can only be set to a value larger than 1 if the operations include IO operations, or if multiple cores are available per executor
- returns
an RDD with mapping function applied to each element
- Note
calling this function loses partitioning for key-value pair RDD
- def toString(): String
- Definition Classes
- Any