Return the union of this RDD and another one.
Return the union of this RDD and another one. Any identical elements will appear multiple
times (use .distinct()
to eliminate them).
Aggregate the elements of each partition, and then the results for all the partitions, using given combine functions and a neutral "zero value".
Aggregate the elements of each partition, and then the results for all the partitions, using given combine functions and a neutral "zero value". This function can return a different result type, U, than the type of this RDD, T. Thus, we need one operation for merging a T into an U and one operation for merging two U's, as in scala.TraversableOnce. Both of these functions are allowed to modify and return their first argument instead of creating a new U to avoid memory allocation.
Persist this RDD with the default storage level (MEMORY_ONLY
).
Persist this RDD with the default storage level (MEMORY_ONLY
).
Return the Cartesian product of this RDD and another one, that is, the RDD of all pairs of
elements (a, b) where a is in this
and b is in other
.
Return the Cartesian product of this RDD and another one, that is, the RDD of all pairs of
elements (a, b) where a is in this
and b is in other
.
Return an array that contains all of the elements in this RDD.
Return an array that contains all of the elements in this RDD.
Function for computing a given partition.
Function for computing a given partition.
The SparkContext that this RDD was created on.
The SparkContext that this RDD was created on.
Return the number of elements in the RDD.
Return the number of elements in the RDD.
(Experimental) Approximate version of count() that returns a potentially incomplete result within a timeout, even if not all tasks have finished.
(Experimental) Approximate version of count() that returns a potentially incomplete result within a timeout, even if not all tasks have finished.
Return the count of each unique value in this RDD as a map of (value, count) pairs.
Return the count of each unique value in this RDD as a map of (value, count) pairs. The final combine step happens locally on the master, equivalent to running a single reduce task.
(Experimental) Approximate version of countByValue().
(Experimental) Approximate version of countByValue().
How this RDD depends on any parent RDDs.
How this RDD depends on any parent RDDs.
Return a new RDD containing the distinct elements in this RDD.
Return a new RDD containing the distinct elements in this RDD.
Return a new RDD containing only the elements that satisfy a predicate.
Return a new RDD containing only the elements that satisfy a predicate.
Return the first element in this RDD.
Return the first element in this RDD.
Return a new RDD by first applying a function to all elements of this RDD, and then flattening the results.
Return a new RDD by first applying a function to all elements of this RDD, and then flattening the results.
Aggregate the elements of each partition, and then the results for all the partitions, using a given associative function and a neutral "zero value".
Aggregate the elements of each partition, and then the results for all the partitions, using a given associative function and a neutral "zero value". The function op(t1, t2) is allowed to modify t1 and return it as its result value to avoid object allocation; however, it should not modify t2.
Applies a function f to all elements of this RDD.
Applies a function f to all elements of this RDD.
Get the RDD's current storage level, or StorageLevel.
Get the RDD's current storage level, or StorageLevel.NONE if none is set.
Return an RDD created by coalescing all elements within each partition into an array.
Return an RDD created by coalescing all elements within each partition into an array.
Return an RDD of grouped items.
Return an RDD of grouped items.
Return an RDD of grouped elements.
Return an RDD of grouped elements. Each group consists of a key and a sequence of elements mapping to that key.
A unique ID for this RDD (within its SparkContext).
A unique ID for this RDD (within its SparkContext).
Internal method to this RDD; will read from cache if applicable, or otherwise compute it.
Internal method to this RDD; will read from cache if applicable, or otherwise compute it. This should not be called by users directly, but is available for implementors of custom subclasses of RDD.
Return a new RDD by applying a function to all elements of this RDD.
Return a new RDD by applying a function to all elements of this RDD.
Return a new RDD by applying a function to each partition of this RDD.
Return a new RDD by applying a function to each partition of this RDD.
Return a new RDD by applying a function to each partition of this RDD, while tracking the index of the original partition.
Return a new RDD by applying a function to each partition of this RDD, while tracking the index of the original partition.
Optionally overridden by subclasses to specify how they are partitioned.
Optionally overridden by subclasses to specify how they are partitioned.
Persist this RDD with the default storage level (MEMORY_ONLY
).
Persist this RDD with the default storage level (MEMORY_ONLY
).
Set this RDD's storage level to persist its values across operations after the first time it is computed.
Set this RDD's storage level to persist its values across operations after the first time it is computed. Can only be called once on each RDD.
Return an RDD created by piping elements to a forked external process.
Return an RDD created by piping elements to a forked external process.
Return an RDD created by piping elements to a forked external process.
Return an RDD created by piping elements to a forked external process.
Return an RDD created by piping elements to a forked external process.
Return an RDD created by piping elements to a forked external process.
Optionally overridden by subclasses to specify placement preferences.
Optionally overridden by subclasses to specify placement preferences.
Reduces the elements of this RDD using the specified associative binary operator.
Reduces the elements of this RDD using the specified associative binary operator.
Return a sampled subset of this RDD.
Return a sampled subset of this RDD.
Save this RDD as a SequenceFile of serialized objects.
Save this RDD as a SequenceFile of serialized objects.
Save this RDD as a text file, using string representations of elements.
Save this RDD as a text file, using string representations of elements.
Set of partitions in this RDD.
Set of partitions in this RDD.
Take the first num elements of the RDD.
Take the first num elements of the RDD. This currently scans the partitions *one by one*, so it will be slow if a lot of partitions are required. In that case, use collect() to get the whole RDD instead.
Return an array that contains all of the elements in this RDD.
Return an array that contains all of the elements in this RDD.
Return the union of this RDD and another one.
Return the union of this RDD and another one. Any identical elements will appear multiple
times (use .distinct()
to eliminate them).
The resulting RDD from shuffle and running (hash-based) aggregation.