implicit final class KeyValueWrapper[T] extends AnyVal
Creates an RDD of keys and values out of a generic RDD and apply a partitioner at the same time.
- T
the type of values in the RDD
- Alphabetic
- By Inheritance
- KeyValueWrapper
- AnyVal
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new KeyValueWrapper(rdd: RDD[T])
- rdd
the RDD to process
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 keyValueBy[K, V](keyFn: (T) => K, valueFn: (T) => V, partitioner: Partitioner)(implicit arg0: ClassTag[K], arg1: ClassTag[V]): RDD[(K, V)]
Defines a key and a value for each element of
rddand apply a partitioner on the new key.Defines a key and a value for each element of
rddand apply a partitioner on the new key.- K
the type of the new keys
- V
the type of the new values
- keyFn
the function that calculates the key of an RDD element
- valueFn
the function that calculates the values of an RDD element
- partitioner
the partitioner for the new keys applied to the result
- returns
a new RDD of
KandVpartitioned byK
- def keyValueBy[K, V](keyFn: (T) => K, valueFn: (T) => V)(implicit arg0: ClassTag[K]): RDD[(K, V)]
Defines a key and a value for each element of
rdd.Defines a key and a value for each element of
rdd.- K
the type of the new keys
- V
the type of the new values
- keyFn
the function that calculates the key of an RDD element
- valueFn
the function that calculates the values of an RDD element
- returns
a new RDD of
KandV
- def toString(): String
- Definition Classes
- Any