org.apache.spark.rdd
Class UnionRDD<T>

Object
  extended by org.apache.spark.rdd.RDD<T>
      extended by org.apache.spark.rdd.UnionRDD<T>
All Implemented Interfaces:
java.io.Serializable, Logging

public class UnionRDD<T>
extends RDD<T>

See Also:
Serialized Form

Constructor Summary
UnionRDD(SparkContext sc, scala.collection.Seq<RDD<T>> rdds, scala.reflect.ClassTag<T> evidence$2)
           
 
Method Summary
 void clearDependencies()
          Clears the dependencies of this RDD.
 scala.collection.Iterator<T> compute(Partition s, TaskContext context)
          :: DeveloperApi :: Implemented by subclasses to compute a given partition.
 scala.collection.Seq<Dependency<?>> getDependencies()
          Implemented by subclasses to return how this RDD depends on parent RDDs.
 Partition[] getPartitions()
          Implemented by subclasses to return the set of partitions in this RDD.
 scala.collection.Seq<String> getPreferredLocations(Partition s)
          Optionally overridden by subclasses to specify placement preferences.
 scala.collection.Seq<RDD<T>> rdds()
           
 
Methods inherited from class org.apache.spark.rdd.RDD
aggregate, cache, cartesian, checkpoint, checkpointData, coalesce, collect, collect, context, count, countApprox, countApproxDistinct, countApproxDistinct, countByValue, countByValueApprox, creationSite, dependencies, distinct, distinct, doubleRDDToDoubleRDDFunctions, filter, filterWith, first, flatMap, flatMapWith, fold, foreach, foreachPartition, foreachWith, getCheckpointFile, getStorageLevel, glom, groupBy, groupBy, groupBy, id, intersection, intersection, intersection, isCheckpointed, isEmpty, iterator, keyBy, map, mapPartitions, mapPartitionsWithContext, mapPartitionsWithIndex, mapPartitionsWithSplit, mapWith, max, min, name, numericRDDToDoubleRDDFunctions, partitioner, partitions, persist, persist, pipe, pipe, pipe, preferredLocations, randomSplit, rddToAsyncRDDActions, rddToOrderedRDDFunctions, rddToPairRDDFunctions, rddToSequenceFileRDDFunctions, reduce, repartition, sample, saveAsObjectFile, saveAsTextFile, saveAsTextFile, scope, setName, sortBy, sparkContext, subtract, subtract, subtract, take, takeOrdered, takeSample, toArray, toDebugString, toJavaRDD, toLocalIterator, top, toString, treeAggregate, treeReduce, union, unpersist, zip, zipPartitions, zipPartitions, zipPartitions, zipPartitions, zipPartitions, zipPartitions, zipWithIndex, zipWithUniqueId
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.spark.Logging
initializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning
 

Constructor Detail

UnionRDD

public UnionRDD(SparkContext sc,
                scala.collection.Seq<RDD<T>> rdds,
                scala.reflect.ClassTag<T> evidence$2)
Method Detail

rdds

public scala.collection.Seq<RDD<T>> rdds()

getPartitions

public Partition[] getPartitions()
Description copied from class: RDD
Implemented by subclasses to return the set of partitions in this RDD. This method will only be called once, so it is safe to implement a time-consuming computation in it.

Returns:
(undocumented)

getDependencies

public scala.collection.Seq<Dependency<?>> getDependencies()
Description copied from class: RDD
Implemented by subclasses to return how this RDD depends on parent RDDs. This method will only be called once, so it is safe to implement a time-consuming computation in it.

Returns:
(undocumented)

compute

public scala.collection.Iterator<T> compute(Partition s,
                                            TaskContext context)
Description copied from class: RDD
:: DeveloperApi :: Implemented by subclasses to compute a given partition.

Specified by:
compute in class RDD<T>
Parameters:
s - (undocumented)
context - (undocumented)
Returns:
(undocumented)

getPreferredLocations

public scala.collection.Seq<String> getPreferredLocations(Partition s)
Description copied from class: RDD
Optionally overridden by subclasses to specify placement preferences.

Parameters:
s - (undocumented)
Returns:
(undocumented)

clearDependencies

public void clearDependencies()
Description copied from class: RDD
Clears the dependencies of this RDD. This method must ensure that all references to the original parent RDDs is removed to enable the parent RDDs to be garbage collected. Subclasses of RDD may override this method for implementing their own cleaning logic. See UnionRDD for an example.