Class PairDStreamFunctions<K,V>

Object
org.apache.spark.streaming.dstream.PairDStreamFunctions<K,V>
All Implemented Interfaces:
Serializable, scala.Serializable

public class PairDStreamFunctions<K,V> extends Object implements scala.Serializable
Extra functions available on DStream of (key, value) pairs through an implicit conversion.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    PairDStreamFunctions(DStream<scala.Tuple2<K,V>> self, scala.reflect.ClassTag<K> kt, scala.reflect.ClassTag<V> vt, scala.math.Ordering<K> ord)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <W> DStream<scala.Tuple2<K,scala.Tuple2<scala.collection.Iterable<V>,scala.collection.Iterable<W>>>>
    cogroup(DStream<scala.Tuple2<K,W>> other, int numPartitions, scala.reflect.ClassTag<W> evidence$14)
    Return a new DStream by applying 'cogroup' between RDDs of this DStream and other DStream.
    <W> DStream<scala.Tuple2<K,scala.Tuple2<scala.collection.Iterable<V>,scala.collection.Iterable<W>>>>
    cogroup(DStream<scala.Tuple2<K,W>> other, Partitioner partitioner, scala.reflect.ClassTag<W> evidence$15)
    Return a new DStream by applying 'cogroup' between RDDs of this DStream and other DStream.
    <W> DStream<scala.Tuple2<K,scala.Tuple2<scala.collection.Iterable<V>,scala.collection.Iterable<W>>>>
    cogroup(DStream<scala.Tuple2<K,W>> other, scala.reflect.ClassTag<W> evidence$13)
    Return a new DStream by applying 'cogroup' between RDDs of this DStream and other DStream.
    <C> DStream<scala.Tuple2<K,C>>
    combineByKey(scala.Function1<V,C> createCombiner, scala.Function2<C,V,C> mergeValue, scala.Function2<C,C,C> mergeCombiner, Partitioner partitioner, boolean mapSideCombine, scala.reflect.ClassTag<C> evidence$1)
    Combine elements of each key in DStream's RDDs using custom functions.
    <U> DStream<scala.Tuple2<K,U>>
    flatMapValues(scala.Function1<V,scala.collection.TraversableOnce<U>> flatMapValuesFunc, scala.reflect.ClassTag<U> evidence$12)
    Return a new DStream by applying a flatmap function to the value of each key-value pairs in 'this' DStream without changing the key.
    <W> DStream<scala.Tuple2<K,scala.Tuple2<scala.Option<V>,scala.Option<W>>>>
    fullOuterJoin(DStream<scala.Tuple2<K,W>> other, int numPartitions, scala.reflect.ClassTag<W> evidence$26)
    Return a new DStream by applying 'full outer join' between RDDs of this DStream and other DStream.
    <W> DStream<scala.Tuple2<K,scala.Tuple2<scala.Option<V>,scala.Option<W>>>>
    fullOuterJoin(DStream<scala.Tuple2<K,W>> other, Partitioner partitioner, scala.reflect.ClassTag<W> evidence$27)
    Return a new DStream by applying 'full outer join' between RDDs of this DStream and other DStream.
    <W> DStream<scala.Tuple2<K,scala.Tuple2<scala.Option<V>,scala.Option<W>>>>
    fullOuterJoin(DStream<scala.Tuple2<K,W>> other, scala.reflect.ClassTag<W> evidence$25)
    Return a new DStream by applying 'full outer join' between RDDs of this DStream and other DStream.
    DStream<scala.Tuple2<K,scala.collection.Iterable<V>>>
    Return a new DStream by applying groupByKey to each RDD.
    DStream<scala.Tuple2<K,scala.collection.Iterable<V>>>
    groupByKey(int numPartitions)
    Return a new DStream by applying groupByKey to each RDD.
    DStream<scala.Tuple2<K,scala.collection.Iterable<V>>>
    groupByKey(Partitioner partitioner)
    Return a new DStream by applying groupByKey on each RDD.
    DStream<scala.Tuple2<K,scala.collection.Iterable<V>>>
    groupByKeyAndWindow(Duration windowDuration)
    Return a new DStream by applying groupByKey over a sliding window.
    DStream<scala.Tuple2<K,scala.collection.Iterable<V>>>
    groupByKeyAndWindow(Duration windowDuration, Duration slideDuration)
    Return a new DStream by applying groupByKey over a sliding window.
    DStream<scala.Tuple2<K,scala.collection.Iterable<V>>>
    groupByKeyAndWindow(Duration windowDuration, Duration slideDuration, int numPartitions)
    Return a new DStream by applying groupByKey over a sliding window on this DStream.
    DStream<scala.Tuple2<K,scala.collection.Iterable<V>>>
    groupByKeyAndWindow(Duration windowDuration, Duration slideDuration, Partitioner partitioner)
    Create a new DStream by applying groupByKey over a sliding window on this DStream.
    <W> DStream<scala.Tuple2<K,scala.Tuple2<V,W>>>
    join(DStream<scala.Tuple2<K,W>> other, int numPartitions, scala.reflect.ClassTag<W> evidence$17)
    Return a new DStream by applying 'join' between RDDs of this DStream and other DStream.
    <W> DStream<scala.Tuple2<K,scala.Tuple2<V,W>>>
    join(DStream<scala.Tuple2<K,W>> other, Partitioner partitioner, scala.reflect.ClassTag<W> evidence$18)
    Return a new DStream by applying 'join' between RDDs of this DStream and other DStream.
    <W> DStream<scala.Tuple2<K,scala.Tuple2<V,W>>>
    join(DStream<scala.Tuple2<K,W>> other, scala.reflect.ClassTag<W> evidence$16)
    Return a new DStream by applying 'join' between RDDs of this DStream and other DStream.
    <W> DStream<scala.Tuple2<K,scala.Tuple2<V,scala.Option<W>>>>
    leftOuterJoin(DStream<scala.Tuple2<K,W>> other, int numPartitions, scala.reflect.ClassTag<W> evidence$20)
    Return a new DStream by applying 'left outer join' between RDDs of this DStream and other DStream.
    <W> DStream<scala.Tuple2<K,scala.Tuple2<V,scala.Option<W>>>>
    leftOuterJoin(DStream<scala.Tuple2<K,W>> other, Partitioner partitioner, scala.reflect.ClassTag<W> evidence$21)
    Return a new DStream by applying 'left outer join' between RDDs of this DStream and other DStream.
    <W> DStream<scala.Tuple2<K,scala.Tuple2<V,scala.Option<W>>>>
    leftOuterJoin(DStream<scala.Tuple2<K,W>> other, scala.reflect.ClassTag<W> evidence$19)
    Return a new DStream by applying 'left outer join' between RDDs of this DStream and other DStream.
    <U> DStream<scala.Tuple2<K,U>>
    mapValues(scala.Function1<V,U> mapValuesFunc, scala.reflect.ClassTag<U> evidence$11)
    Return a new DStream by applying a map function to the value of each key-value pairs in 'this' DStream without changing the key.
    <StateType, MappedType>
    MapWithStateDStream<K,V,StateType,MappedType>
    mapWithState(StateSpec<K,V,StateType,MappedType> spec, scala.reflect.ClassTag<StateType> evidence$2, scala.reflect.ClassTag<MappedType> evidence$3)
    Return a MapWithStateDStream by applying a function to every key-value element of this stream, while maintaining some state data for each unique key.
    DStream<scala.Tuple2<K,V>>
    reduceByKey(scala.Function2<V,V,V> reduceFunc)
    Return a new DStream by applying reduceByKey to each RDD.
    DStream<scala.Tuple2<K,V>>
    reduceByKey(scala.Function2<V,V,V> reduceFunc, int numPartitions)
    Return a new DStream by applying reduceByKey to each RDD.
    DStream<scala.Tuple2<K,V>>
    reduceByKey(scala.Function2<V,V,V> reduceFunc, Partitioner partitioner)
    Return a new DStream by applying reduceByKey to each RDD.
    DStream<scala.Tuple2<K,V>>
    reduceByKeyAndWindow(scala.Function2<V,V,V> reduceFunc, Duration windowDuration)
    Return a new DStream by applying reduceByKey over a sliding window on this DStream.
    DStream<scala.Tuple2<K,V>>
    reduceByKeyAndWindow(scala.Function2<V,V,V> reduceFunc, Duration windowDuration, Duration slideDuration)
    Return a new DStream by applying reduceByKey over a sliding window.
    DStream<scala.Tuple2<K,V>>
    reduceByKeyAndWindow(scala.Function2<V,V,V> reduceFunc, Duration windowDuration, Duration slideDuration, int numPartitions)
    Return a new DStream by applying reduceByKey over a sliding window.
    DStream<scala.Tuple2<K,V>>
    reduceByKeyAndWindow(scala.Function2<V,V,V> reduceFunc, Duration windowDuration, Duration slideDuration, Partitioner partitioner)
    Return a new DStream by applying reduceByKey over a sliding window.
    DStream<scala.Tuple2<K,V>>
    reduceByKeyAndWindow(scala.Function2<V,V,V> reduceFunc, scala.Function2<V,V,V> invReduceFunc, Duration windowDuration, Duration slideDuration, int numPartitions, scala.Function1<scala.Tuple2<K,V>,Object> filterFunc)
    Return a new DStream by applying incremental reduceByKey over a sliding window.
    DStream<scala.Tuple2<K,V>>
    reduceByKeyAndWindow(scala.Function2<V,V,V> reduceFunc, scala.Function2<V,V,V> invReduceFunc, Duration windowDuration, Duration slideDuration, Partitioner partitioner, scala.Function1<scala.Tuple2<K,V>,Object> filterFunc)
    Return a new DStream by applying incremental reduceByKey over a sliding window.
    <W> DStream<scala.Tuple2<K,scala.Tuple2<scala.Option<V>,W>>>
    rightOuterJoin(DStream<scala.Tuple2<K,W>> other, int numPartitions, scala.reflect.ClassTag<W> evidence$23)
    Return a new DStream by applying 'right outer join' between RDDs of this DStream and other DStream.
    <W> DStream<scala.Tuple2<K,scala.Tuple2<scala.Option<V>,W>>>
    rightOuterJoin(DStream<scala.Tuple2<K,W>> other, Partitioner partitioner, scala.reflect.ClassTag<W> evidence$24)
    Return a new DStream by applying 'right outer join' between RDDs of this DStream and other DStream.
    <W> DStream<scala.Tuple2<K,scala.Tuple2<scala.Option<V>,W>>>
    rightOuterJoin(DStream<scala.Tuple2<K,W>> other, scala.reflect.ClassTag<W> evidence$22)
    Return a new DStream by applying 'right outer join' between RDDs of this DStream and other DStream.
    void
    saveAsHadoopFiles(String prefix, String suffix, Class<?> keyClass, Class<?> valueClass, Class<? extends org.apache.hadoop.mapred.OutputFormat<?,?>> outputFormatClass, org.apache.hadoop.mapred.JobConf conf)
    Save each RDD in this DStream as a Hadoop file.
    <F extends org.apache.hadoop.mapred.OutputFormat<K, V>>
    void
    saveAsHadoopFiles(String prefix, String suffix, scala.reflect.ClassTag<F> fm)
    Save each RDD in this DStream as a Hadoop file.
    void
    saveAsNewAPIHadoopFiles(String prefix, String suffix, Class<?> keyClass, Class<?> valueClass, Class<? extends org.apache.hadoop.mapreduce.OutputFormat<?,?>> outputFormatClass, org.apache.hadoop.conf.Configuration conf)
    Save each RDD in this DStream as a Hadoop file.
    <F extends org.apache.hadoop.mapreduce.OutputFormat<K, V>>
    void
    saveAsNewAPIHadoopFiles(String prefix, String suffix, scala.reflect.ClassTag<F> fm)
    Save each RDD in this DStream as a Hadoop file.
    <S> DStream<scala.Tuple2<K,S>>
    updateStateByKey(scala.Function1<scala.collection.Iterator<scala.Tuple3<K,scala.collection.Seq<V>,scala.Option<S>>>,scala.collection.Iterator<scala.Tuple2<K,S>>> updateFunc, Partitioner partitioner, boolean rememberPartitioner, RDD<scala.Tuple2<K,S>> initialRDD, scala.reflect.ClassTag<S> evidence$9)
    Return a new "state" DStream where the state for each key is updated by applying the given function on the previous state of the key and the new values of each key.
    <S> DStream<scala.Tuple2<K,S>>
    updateStateByKey(scala.Function1<scala.collection.Iterator<scala.Tuple3<K,scala.collection.Seq<V>,scala.Option<S>>>,scala.collection.Iterator<scala.Tuple2<K,S>>> updateFunc, Partitioner partitioner, boolean rememberPartitioner, scala.reflect.ClassTag<S> evidence$7)
    Return a new "state" DStream where the state for each key is updated by applying the given function on the previous state of the key and the new values of each key.
    <S> DStream<scala.Tuple2<K,S>>
    updateStateByKey(scala.Function2<scala.collection.Seq<V>,scala.Option<S>,scala.Option<S>> updateFunc, int numPartitions, scala.reflect.ClassTag<S> evidence$5)
    Return a new "state" DStream where the state for each key is updated by applying the given function on the previous state of the key and the new values of each key.
    <S> DStream<scala.Tuple2<K,S>>
    updateStateByKey(scala.Function2<scala.collection.Seq<V>,scala.Option<S>,scala.Option<S>> updateFunc, Partitioner partitioner, RDD<scala.Tuple2<K,S>> initialRDD, scala.reflect.ClassTag<S> evidence$8)
    Return a new "state" DStream where the state for each key is updated by applying the given function on the previous state of the key and the new values of the key.
    <S> DStream<scala.Tuple2<K,S>>
    updateStateByKey(scala.Function2<scala.collection.Seq<V>,scala.Option<S>,scala.Option<S>> updateFunc, Partitioner partitioner, scala.reflect.ClassTag<S> evidence$6)
    Return a new "state" DStream where the state for each key is updated by applying the given function on the previous state of the key and the new values of the key.
    <S> DStream<scala.Tuple2<K,S>>
    updateStateByKey(scala.Function2<scala.collection.Seq<V>,scala.Option<S>,scala.Option<S>> updateFunc, scala.reflect.ClassTag<S> evidence$4)
    Return a new "state" DStream where the state for each key is updated by applying the given function on the previous state of the key and the new values of each key.
    <S> DStream<scala.Tuple2<K,S>>
    updateStateByKey(scala.Function4<Time,K,scala.collection.Seq<V>,scala.Option<S>,scala.Option<S>> updateFunc, Partitioner partitioner, boolean rememberPartitioner, scala.Option<RDD<scala.Tuple2<K,S>>> initialRDD, scala.reflect.ClassTag<S> evidence$10)
    Return a new "state" DStream where the state for each key is updated by applying the given function on the previous state of the key and the new values of the key.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PairDStreamFunctions

      public PairDStreamFunctions(DStream<scala.Tuple2<K,V>> self, scala.reflect.ClassTag<K> kt, scala.reflect.ClassTag<V> vt, scala.math.Ordering<K> ord)
  • Method Details

    • cogroup

      public <W> DStream<scala.Tuple2<K,scala.Tuple2<scala.collection.Iterable<V>,scala.collection.Iterable<W>>>> cogroup(DStream<scala.Tuple2<K,W>> other, scala.reflect.ClassTag<W> evidence$13)
      Return a new DStream by applying 'cogroup' between RDDs of this DStream and other DStream. Hash partitioning is used to generate the RDDs with Spark's default number of partitions.
      Parameters:
      other - (undocumented)
      evidence$13 - (undocumented)
      Returns:
      (undocumented)
    • cogroup

      public <W> DStream<scala.Tuple2<K,scala.Tuple2<scala.collection.Iterable<V>,scala.collection.Iterable<W>>>> cogroup(DStream<scala.Tuple2<K,W>> other, int numPartitions, scala.reflect.ClassTag<W> evidence$14)
      Return a new DStream by applying 'cogroup' between RDDs of this DStream and other DStream. Hash partitioning is used to generate the RDDs with numPartitions partitions.
      Parameters:
      other - (undocumented)
      numPartitions - (undocumented)
      evidence$14 - (undocumented)
      Returns:
      (undocumented)
    • cogroup

      public <W> DStream<scala.Tuple2<K,scala.Tuple2<scala.collection.Iterable<V>,scala.collection.Iterable<W>>>> cogroup(DStream<scala.Tuple2<K,W>> other, Partitioner partitioner, scala.reflect.ClassTag<W> evidence$15)
      Return a new DStream by applying 'cogroup' between RDDs of this DStream and other DStream. The supplied org.apache.spark.Partitioner is used to partition the generated RDDs.
      Parameters:
      other - (undocumented)
      partitioner - (undocumented)
      evidence$15 - (undocumented)
      Returns:
      (undocumented)
    • combineByKey

      public <C> DStream<scala.Tuple2<K,C>> combineByKey(scala.Function1<V,C> createCombiner, scala.Function2<C,V,C> mergeValue, scala.Function2<C,C,C> mergeCombiner, Partitioner partitioner, boolean mapSideCombine, scala.reflect.ClassTag<C> evidence$1)
      Combine elements of each key in DStream's RDDs using custom functions. This is similar to the combineByKey for RDDs. Please refer to combineByKey in org.apache.spark.rdd.PairRDDFunctions in the Spark core documentation for more information.
      Parameters:
      createCombiner - (undocumented)
      mergeValue - (undocumented)
      mergeCombiner - (undocumented)
      partitioner - (undocumented)
      mapSideCombine - (undocumented)
      evidence$1 - (undocumented)
      Returns:
      (undocumented)
    • flatMapValues

      public <U> DStream<scala.Tuple2<K,U>> flatMapValues(scala.Function1<V,scala.collection.TraversableOnce<U>> flatMapValuesFunc, scala.reflect.ClassTag<U> evidence$12)
      Return a new DStream by applying a flatmap function to the value of each key-value pairs in 'this' DStream without changing the key.
      Parameters:
      flatMapValuesFunc - (undocumented)
      evidence$12 - (undocumented)
      Returns:
      (undocumented)
    • fullOuterJoin

      public <W> DStream<scala.Tuple2<K,scala.Tuple2<scala.Option<V>,scala.Option<W>>>> fullOuterJoin(DStream<scala.Tuple2<K,W>> other, scala.reflect.ClassTag<W> evidence$25)
      Return a new DStream by applying 'full outer join' between RDDs of this DStream and other DStream. Hash partitioning is used to generate the RDDs with Spark's default number of partitions.
      Parameters:
      other - (undocumented)
      evidence$25 - (undocumented)
      Returns:
      (undocumented)
    • fullOuterJoin

      public <W> DStream<scala.Tuple2<K,scala.Tuple2<scala.Option<V>,scala.Option<W>>>> fullOuterJoin(DStream<scala.Tuple2<K,W>> other, int numPartitions, scala.reflect.ClassTag<W> evidence$26)
      Return a new DStream by applying 'full outer join' between RDDs of this DStream and other DStream. Hash partitioning is used to generate the RDDs with numPartitions partitions.
      Parameters:
      other - (undocumented)
      numPartitions - (undocumented)
      evidence$26 - (undocumented)
      Returns:
      (undocumented)
    • fullOuterJoin

      public <W> DStream<scala.Tuple2<K,scala.Tuple2<scala.Option<V>,scala.Option<W>>>> fullOuterJoin(DStream<scala.Tuple2<K,W>> other, Partitioner partitioner, scala.reflect.ClassTag<W> evidence$27)
      Return a new DStream by applying 'full outer join' between RDDs of this DStream and other DStream. The supplied org.apache.spark.Partitioner is used to control the partitioning of each RDD.
      Parameters:
      other - (undocumented)
      partitioner - (undocumented)
      evidence$27 - (undocumented)
      Returns:
      (undocumented)
    • groupByKey

      public DStream<scala.Tuple2<K,scala.collection.Iterable<V>>> groupByKey()
      Return a new DStream by applying groupByKey to each RDD. Hash partitioning is used to generate the RDDs with Spark's default number of partitions.
      Returns:
      (undocumented)
    • groupByKey

      public DStream<scala.Tuple2<K,scala.collection.Iterable<V>>> groupByKey(int numPartitions)
      Return a new DStream by applying groupByKey to each RDD. Hash partitioning is used to generate the RDDs with numPartitions partitions.
      Parameters:
      numPartitions - (undocumented)
      Returns:
      (undocumented)
    • groupByKey

      public DStream<scala.Tuple2<K,scala.collection.Iterable<V>>> groupByKey(Partitioner partitioner)
      Return a new DStream by applying groupByKey on each RDD. The supplied org.apache.spark.Partitioner is used to control the partitioning of each RDD.
      Parameters:
      partitioner - (undocumented)
      Returns:
      (undocumented)
    • groupByKeyAndWindow

      public DStream<scala.Tuple2<K,scala.collection.Iterable<V>>> groupByKeyAndWindow(Duration windowDuration)
      Return a new DStream by applying groupByKey over a sliding window. This is similar to DStream.groupByKey() but applies it over a sliding window. The new DStream generates RDDs with the same interval as this DStream. Hash partitioning is used to generate the RDDs with Spark's default number of partitions.
      Parameters:
      windowDuration - width of the window; must be a multiple of this DStream's batching interval
      Returns:
      (undocumented)
    • groupByKeyAndWindow

      public DStream<scala.Tuple2<K,scala.collection.Iterable<V>>> groupByKeyAndWindow(Duration windowDuration, Duration slideDuration)
      Return a new DStream by applying groupByKey over a sliding window. Similar to DStream.groupByKey(), but applies it over a sliding window. Hash partitioning is used to generate the RDDs with Spark's default number of partitions.
      Parameters:
      windowDuration - width of the window; must be a multiple of this DStream's batching interval
      slideDuration - sliding interval of the window (i.e., the interval after which the new DStream will generate RDDs); must be a multiple of this DStream's batching interval
      Returns:
      (undocumented)
    • groupByKeyAndWindow

      public DStream<scala.Tuple2<K,scala.collection.Iterable<V>>> groupByKeyAndWindow(Duration windowDuration, Duration slideDuration, int numPartitions)
      Return a new DStream by applying groupByKey over a sliding window on this DStream. Similar to DStream.groupByKey(), but applies it over a sliding window. Hash partitioning is used to generate the RDDs with numPartitions partitions.
      Parameters:
      windowDuration - width of the window; must be a multiple of this DStream's batching interval
      slideDuration - sliding interval of the window (i.e., the interval after which the new DStream will generate RDDs); must be a multiple of this DStream's batching interval
      numPartitions - number of partitions of each RDD in the new DStream; if not specified then Spark's default number of partitions will be used
      Returns:
      (undocumented)
    • groupByKeyAndWindow

      public DStream<scala.Tuple2<K,scala.collection.Iterable<V>>> groupByKeyAndWindow(Duration windowDuration, Duration slideDuration, Partitioner partitioner)
      Create a new DStream by applying groupByKey over a sliding window on this DStream. Similar to DStream.groupByKey(), but applies it over a sliding window.
      Parameters:
      windowDuration - width of the window; must be a multiple of this DStream's batching interval
      slideDuration - sliding interval of the window (i.e., the interval after which the new DStream will generate RDDs); must be a multiple of this DStream's batching interval
      partitioner - partitioner for controlling the partitioning of each RDD in the new DStream.
      Returns:
      (undocumented)
    • join

      public <W> DStream<scala.Tuple2<K,scala.Tuple2<V,W>>> join(DStream<scala.Tuple2<K,W>> other, scala.reflect.ClassTag<W> evidence$16)
      Return a new DStream by applying 'join' between RDDs of this DStream and other DStream. Hash partitioning is used to generate the RDDs with Spark's default number of partitions.
      Parameters:
      other - (undocumented)
      evidence$16 - (undocumented)
      Returns:
      (undocumented)
    • join

      public <W> DStream<scala.Tuple2<K,scala.Tuple2<V,W>>> join(DStream<scala.Tuple2<K,W>> other, int numPartitions, scala.reflect.ClassTag<W> evidence$17)
      Return a new DStream by applying 'join' between RDDs of this DStream and other DStream. Hash partitioning is used to generate the RDDs with numPartitions partitions.
      Parameters:
      other - (undocumented)
      numPartitions - (undocumented)
      evidence$17 - (undocumented)
      Returns:
      (undocumented)
    • join

      public <W> DStream<scala.Tuple2<K,scala.Tuple2<V,W>>> join(DStream<scala.Tuple2<K,W>> other, Partitioner partitioner, scala.reflect.ClassTag<W> evidence$18)
      Return a new DStream by applying 'join' between RDDs of this DStream and other DStream. The supplied org.apache.spark.Partitioner is used to control the partitioning of each RDD.
      Parameters:
      other - (undocumented)
      partitioner - (undocumented)
      evidence$18 - (undocumented)
      Returns:
      (undocumented)
    • leftOuterJoin

      public <W> DStream<scala.Tuple2<K,scala.Tuple2<V,scala.Option<W>>>> leftOuterJoin(DStream<scala.Tuple2<K,W>> other, scala.reflect.ClassTag<W> evidence$19)
      Return a new DStream by applying 'left outer join' between RDDs of this DStream and other DStream. Hash partitioning is used to generate the RDDs with Spark's default number of partitions.
      Parameters:
      other - (undocumented)
      evidence$19 - (undocumented)
      Returns:
      (undocumented)
    • leftOuterJoin

      public <W> DStream<scala.Tuple2<K,scala.Tuple2<V,scala.Option<W>>>> leftOuterJoin(DStream<scala.Tuple2<K,W>> other, int numPartitions, scala.reflect.ClassTag<W> evidence$20)
      Return a new DStream by applying 'left outer join' between RDDs of this DStream and other DStream. Hash partitioning is used to generate the RDDs with numPartitions partitions.
      Parameters:
      other - (undocumented)
      numPartitions - (undocumented)
      evidence$20 - (undocumented)
      Returns:
      (undocumented)
    • leftOuterJoin

      public <W> DStream<scala.Tuple2<K,scala.Tuple2<V,scala.Option<W>>>> leftOuterJoin(DStream<scala.Tuple2<K,W>> other, Partitioner partitioner, scala.reflect.ClassTag<W> evidence$21)
      Return a new DStream by applying 'left outer join' between RDDs of this DStream and other DStream. The supplied org.apache.spark.Partitioner is used to control the partitioning of each RDD.
      Parameters:
      other - (undocumented)
      partitioner - (undocumented)
      evidence$21 - (undocumented)
      Returns:
      (undocumented)
    • mapValues

      public <U> DStream<scala.Tuple2<K,U>> mapValues(scala.Function1<V,U> mapValuesFunc, scala.reflect.ClassTag<U> evidence$11)
      Return a new DStream by applying a map function to the value of each key-value pairs in 'this' DStream without changing the key.
      Parameters:
      mapValuesFunc - (undocumented)
      evidence$11 - (undocumented)
      Returns:
      (undocumented)
    • mapWithState

      public <StateType, MappedType> MapWithStateDStream<K,V,StateType,MappedType> mapWithState(StateSpec<K,V,StateType,MappedType> spec, scala.reflect.ClassTag<StateType> evidence$2, scala.reflect.ClassTag<MappedType> evidence$3)
      Return a MapWithStateDStream by applying a function to every key-value element of this stream, while maintaining some state data for each unique key. The mapping function and other specification (e.g. partitioners, timeouts, initial state data, etc.) of this transformation can be specified using StateSpec class. The state data is accessible in as a parameter of type State in the mapping function.

      Example of using mapWithState:

      
          // A mapping function that maintains an integer state and return a String
          def mappingFunction(key: String, value: Option[Int], state: State[Int]): Option[String] = {
            // Use state.exists(), state.get(), state.update() and state.remove()
            // to manage state, and return the necessary string
          }
      
          val spec = StateSpec.function(mappingFunction).numPartitions(10)
      
          val mapWithStateDStream = keyValueDStream.mapWithState[StateType, MappedType](spec)
       

      Parameters:
      spec - Specification of this transformation
      evidence$2 - (undocumented)
      evidence$3 - (undocumented)
      Returns:
      (undocumented)
    • reduceByKey

      public DStream<scala.Tuple2<K,V>> reduceByKey(scala.Function2<V,V,V> reduceFunc)
      Return a new DStream by applying reduceByKey to each RDD. The values for each key are merged using the associative and commutative reduce function. Hash partitioning is used to generate the RDDs with Spark's default number of partitions.
      Parameters:
      reduceFunc - (undocumented)
      Returns:
      (undocumented)
    • reduceByKey

      public DStream<scala.Tuple2<K,V>> reduceByKey(scala.Function2<V,V,V> reduceFunc, int numPartitions)
      Return a new DStream by applying reduceByKey to each RDD. The values for each key are merged using the supplied reduce function. Hash partitioning is used to generate the RDDs with numPartitions partitions.
      Parameters:
      reduceFunc - (undocumented)
      numPartitions - (undocumented)
      Returns:
      (undocumented)
    • reduceByKey

      public DStream<scala.Tuple2<K,V>> reduceByKey(scala.Function2<V,V,V> reduceFunc, Partitioner partitioner)
      Return a new DStream by applying reduceByKey to each RDD. The values for each key are merged using the supplied reduce function. org.apache.spark.Partitioner is used to control the partitioning of each RDD.
      Parameters:
      reduceFunc - (undocumented)
      partitioner - (undocumented)
      Returns:
      (undocumented)
    • reduceByKeyAndWindow

      public DStream<scala.Tuple2<K,V>> reduceByKeyAndWindow(scala.Function2<V,V,V> reduceFunc, Duration windowDuration)
      Return a new DStream by applying reduceByKey over a sliding window on this DStream. Similar to DStream.reduceByKey(), but applies it over a sliding window. The new DStream generates RDDs with the same interval as this DStream. Hash partitioning is used to generate the RDDs with Spark's default number of partitions.
      Parameters:
      reduceFunc - associative and commutative reduce function
      windowDuration - width of the window; must be a multiple of this DStream's batching interval
      Returns:
      (undocumented)
    • reduceByKeyAndWindow

      public DStream<scala.Tuple2<K,V>> reduceByKeyAndWindow(scala.Function2<V,V,V> reduceFunc, Duration windowDuration, Duration slideDuration)
      Return a new DStream by applying reduceByKey over a sliding window. This is similar to DStream.reduceByKey() but applies it over a sliding window. Hash partitioning is used to generate the RDDs with Spark's default number of partitions.
      Parameters:
      reduceFunc - associative and commutative reduce function
      windowDuration - width of the window; must be a multiple of this DStream's batching interval
      slideDuration - sliding interval of the window (i.e., the interval after which the new DStream will generate RDDs); must be a multiple of this DStream's batching interval
      Returns:
      (undocumented)
    • reduceByKeyAndWindow

      public DStream<scala.Tuple2<K,V>> reduceByKeyAndWindow(scala.Function2<V,V,V> reduceFunc, Duration windowDuration, Duration slideDuration, int numPartitions)
      Return a new DStream by applying reduceByKey over a sliding window. This is similar to DStream.reduceByKey() but applies it over a sliding window. Hash partitioning is used to generate the RDDs with numPartitions partitions.
      Parameters:
      reduceFunc - associative and commutative reduce function
      windowDuration - width of the window; must be a multiple of this DStream's batching interval
      slideDuration - sliding interval of the window (i.e., the interval after which the new DStream will generate RDDs); must be a multiple of this DStream's batching interval
      numPartitions - number of partitions of each RDD in the new DStream.
      Returns:
      (undocumented)
    • reduceByKeyAndWindow

      public DStream<scala.Tuple2<K,V>> reduceByKeyAndWindow(scala.Function2<V,V,V> reduceFunc, Duration windowDuration, Duration slideDuration, Partitioner partitioner)
      Return a new DStream by applying reduceByKey over a sliding window. Similar to DStream.reduceByKey(), but applies it over a sliding window.
      Parameters:
      reduceFunc - associative and commutative reduce function
      windowDuration - width of the window; must be a multiple of this DStream's batching interval
      slideDuration - sliding interval of the window (i.e., the interval after which the new DStream will generate RDDs); must be a multiple of this DStream's batching interval
      partitioner - partitioner for controlling the partitioning of each RDD in the new DStream.
      Returns:
      (undocumented)
    • reduceByKeyAndWindow

      public DStream<scala.Tuple2<K,V>> reduceByKeyAndWindow(scala.Function2<V,V,V> reduceFunc, scala.Function2<V,V,V> invReduceFunc, Duration windowDuration, Duration slideDuration, int numPartitions, scala.Function1<scala.Tuple2<K,V>,Object> filterFunc)
      Return a new DStream by applying incremental reduceByKey over a sliding window. The reduced value of over a new window is calculated using the old window's reduced value : 1. reduce the new values that entered the window (e.g., adding new counts)

      2. "inverse reduce" the old values that left the window (e.g., subtracting old counts)

      This is more efficient than reduceByKeyAndWindow without "inverse reduce" function. However, it is applicable to only "invertible reduce functions". Hash partitioning is used to generate the RDDs with Spark's default number of partitions.

      Parameters:
      reduceFunc - associative and commutative reduce function
      invReduceFunc - inverse reduce function; such that for all y, invertible x: invReduceFunc(reduceFunc(x, y), x) = y
      windowDuration - width of the window; must be a multiple of this DStream's batching interval
      slideDuration - sliding interval of the window (i.e., the interval after which the new DStream will generate RDDs); must be a multiple of this DStream's batching interval
      filterFunc - Optional function to filter expired key-value pairs; only pairs that satisfy the function are retained
      numPartitions - (undocumented)
      Returns:
      (undocumented)
    • reduceByKeyAndWindow

      public DStream<scala.Tuple2<K,V>> reduceByKeyAndWindow(scala.Function2<V,V,V> reduceFunc, scala.Function2<V,V,V> invReduceFunc, Duration windowDuration, Duration slideDuration, Partitioner partitioner, scala.Function1<scala.Tuple2<K,V>,Object> filterFunc)
      Return a new DStream by applying incremental reduceByKey over a sliding window. The reduced value of over a new window is calculated using the old window's reduced value : 1. reduce the new values that entered the window (e.g., adding new counts) 2. "inverse reduce" the old values that left the window (e.g., subtracting old counts) This is more efficient than reduceByKeyAndWindow without "inverse reduce" function. However, it is applicable to only "invertible reduce functions".
      Parameters:
      reduceFunc - associative and commutative reduce function
      invReduceFunc - inverse reduce function
      windowDuration - width of the window; must be a multiple of this DStream's batching interval
      slideDuration - sliding interval of the window (i.e., the interval after which the new DStream will generate RDDs); must be a multiple of this DStream's batching interval
      partitioner - partitioner for controlling the partitioning of each RDD in the new DStream.
      filterFunc - Optional function to filter expired key-value pairs; only pairs that satisfy the function are retained
      Returns:
      (undocumented)
    • rightOuterJoin

      public <W> DStream<scala.Tuple2<K,scala.Tuple2<scala.Option<V>,W>>> rightOuterJoin(DStream<scala.Tuple2<K,W>> other, scala.reflect.ClassTag<W> evidence$22)
      Return a new DStream by applying 'right outer join' between RDDs of this DStream and other DStream. Hash partitioning is used to generate the RDDs with Spark's default number of partitions.
      Parameters:
      other - (undocumented)
      evidence$22 - (undocumented)
      Returns:
      (undocumented)
    • rightOuterJoin

      public <W> DStream<scala.Tuple2<K,scala.Tuple2<scala.Option<V>,W>>> rightOuterJoin(DStream<scala.Tuple2<K,W>> other, int numPartitions, scala.reflect.ClassTag<W> evidence$23)
      Return a new DStream by applying 'right outer join' between RDDs of this DStream and other DStream. Hash partitioning is used to generate the RDDs with numPartitions partitions.
      Parameters:
      other - (undocumented)
      numPartitions - (undocumented)
      evidence$23 - (undocumented)
      Returns:
      (undocumented)
    • rightOuterJoin

      public <W> DStream<scala.Tuple2<K,scala.Tuple2<scala.Option<V>,W>>> rightOuterJoin(DStream<scala.Tuple2<K,W>> other, Partitioner partitioner, scala.reflect.ClassTag<W> evidence$24)
      Return a new DStream by applying 'right outer join' between RDDs of this DStream and other DStream. The supplied org.apache.spark.Partitioner is used to control the partitioning of each RDD.
      Parameters:
      other - (undocumented)
      partitioner - (undocumented)
      evidence$24 - (undocumented)
      Returns:
      (undocumented)
    • saveAsHadoopFiles

      public <F extends org.apache.hadoop.mapred.OutputFormat<K, V>> void saveAsHadoopFiles(String prefix, String suffix, scala.reflect.ClassTag<F> fm)
      Save each RDD in this DStream as a Hadoop file. The file name at each batch interval is generated based on prefix and suffix: "prefix-TIME_IN_MS.suffix"
      Parameters:
      prefix - (undocumented)
      suffix - (undocumented)
      fm - (undocumented)
    • saveAsHadoopFiles

      public void saveAsHadoopFiles(String prefix, String suffix, Class<?> keyClass, Class<?> valueClass, Class<? extends org.apache.hadoop.mapred.OutputFormat<?,?>> outputFormatClass, org.apache.hadoop.mapred.JobConf conf)
      Save each RDD in this DStream as a Hadoop file. The file name at each batch interval is generated based on prefix and suffix: "prefix-TIME_IN_MS.suffix"
      Parameters:
      prefix - (undocumented)
      suffix - (undocumented)
      keyClass - (undocumented)
      valueClass - (undocumented)
      outputFormatClass - (undocumented)
      conf - (undocumented)
    • saveAsNewAPIHadoopFiles

      public <F extends org.apache.hadoop.mapreduce.OutputFormat<K, V>> void saveAsNewAPIHadoopFiles(String prefix, String suffix, scala.reflect.ClassTag<F> fm)
      Save each RDD in this DStream as a Hadoop file. The file name at each batch interval is generated based on prefix and suffix: "prefix-TIME_IN_MS.suffix".
      Parameters:
      prefix - (undocumented)
      suffix - (undocumented)
      fm - (undocumented)
    • saveAsNewAPIHadoopFiles

      public void saveAsNewAPIHadoopFiles(String prefix, String suffix, Class<?> keyClass, Class<?> valueClass, Class<? extends org.apache.hadoop.mapreduce.OutputFormat<?,?>> outputFormatClass, org.apache.hadoop.conf.Configuration conf)
      Save each RDD in this DStream as a Hadoop file. The file name at each batch interval is generated based on prefix and suffix: "prefix-TIME_IN_MS.suffix".
      Parameters:
      prefix - (undocumented)
      suffix - (undocumented)
      keyClass - (undocumented)
      valueClass - (undocumented)
      outputFormatClass - (undocumented)
      conf - (undocumented)
    • updateStateByKey

      public <S> DStream<scala.Tuple2<K,S>> updateStateByKey(scala.Function2<scala.collection.Seq<V>,scala.Option<S>,scala.Option<S>> updateFunc, scala.reflect.ClassTag<S> evidence$4)
      Return a new "state" DStream where the state for each key is updated by applying the given function on the previous state of the key and the new values of each key. In every batch the updateFunc will be called for each state even if there are no new values. Hash partitioning is used to generate the RDDs with Spark's default number of partitions.
      Parameters:
      updateFunc - State update function. If this function returns None, then corresponding state key-value pair will be eliminated.
      evidence$4 - (undocumented)
      Returns:
      (undocumented)
    • updateStateByKey

      public <S> DStream<scala.Tuple2<K,S>> updateStateByKey(scala.Function2<scala.collection.Seq<V>,scala.Option<S>,scala.Option<S>> updateFunc, int numPartitions, scala.reflect.ClassTag<S> evidence$5)
      Return a new "state" DStream where the state for each key is updated by applying the given function on the previous state of the key and the new values of each key. In every batch the updateFunc will be called for each state even if there are no new values. Hash partitioning is used to generate the RDDs with numPartitions partitions.
      Parameters:
      updateFunc - State update function. If this function returns None, then corresponding state key-value pair will be eliminated.
      numPartitions - Number of partitions of each RDD in the new DStream.
      evidence$5 - (undocumented)
      Returns:
      (undocumented)
    • updateStateByKey

      public <S> DStream<scala.Tuple2<K,S>> updateStateByKey(scala.Function2<scala.collection.Seq<V>,scala.Option<S>,scala.Option<S>> updateFunc, Partitioner partitioner, scala.reflect.ClassTag<S> evidence$6)
      Return a new "state" DStream where the state for each key is updated by applying the given function on the previous state of the key and the new values of the key. In every batch the updateFunc will be called for each state even if there are no new values. Partitioner is used to control the partitioning of each RDD.
      Parameters:
      updateFunc - State update function. If this function returns None, then corresponding state key-value pair will be eliminated.
      partitioner - Partitioner for controlling the partitioning of each RDD in the new DStream.
      evidence$6 - (undocumented)
      Returns:
      (undocumented)
    • updateStateByKey

      public <S> DStream<scala.Tuple2<K,S>> updateStateByKey(scala.Function1<scala.collection.Iterator<scala.Tuple3<K,scala.collection.Seq<V>,scala.Option<S>>>,scala.collection.Iterator<scala.Tuple2<K,S>>> updateFunc, Partitioner partitioner, boolean rememberPartitioner, scala.reflect.ClassTag<S> evidence$7)
      Return a new "state" DStream where the state for each key is updated by applying the given function on the previous state of the key and the new values of each key. In every batch the updateFunc will be called for each state even if there are no new values. Partitioner is used to control the partitioning of each RDD.
      Parameters:
      updateFunc - State update function. Note, that this function may generate a different tuple with a different key than the input key. Therefore keys may be removed or added in this way. It is up to the developer to decide whether to remember the partitioner despite the key being changed.
      partitioner - Partitioner for controlling the partitioning of each RDD in the new DStream
      rememberPartitioner - Whether to remember the partitioner object in the generated RDDs.
      evidence$7 - (undocumented)
      Returns:
      (undocumented)
    • updateStateByKey

      public <S> DStream<scala.Tuple2<K,S>> updateStateByKey(scala.Function2<scala.collection.Seq<V>,scala.Option<S>,scala.Option<S>> updateFunc, Partitioner partitioner, RDD<scala.Tuple2<K,S>> initialRDD, scala.reflect.ClassTag<S> evidence$8)
      Return a new "state" DStream where the state for each key is updated by applying the given function on the previous state of the key and the new values of the key. In every batch the updateFunc will be called for each state even if there are no new values. org.apache.spark.Partitioner is used to control the partitioning of each RDD.
      Parameters:
      updateFunc - State update function. If this function returns None, then corresponding state key-value pair will be eliminated.
      partitioner - Partitioner for controlling the partitioning of each RDD in the new DStream.
      initialRDD - initial state value of each key.
      evidence$8 - (undocumented)
      Returns:
      (undocumented)
    • updateStateByKey

      public <S> DStream<scala.Tuple2<K,S>> updateStateByKey(scala.Function1<scala.collection.Iterator<scala.Tuple3<K,scala.collection.Seq<V>,scala.Option<S>>>,scala.collection.Iterator<scala.Tuple2<K,S>>> updateFunc, Partitioner partitioner, boolean rememberPartitioner, RDD<scala.Tuple2<K,S>> initialRDD, scala.reflect.ClassTag<S> evidence$9)
      Return a new "state" DStream where the state for each key is updated by applying the given function on the previous state of the key and the new values of each key. In every batch the updateFunc will be called for each state even if there are no new values. org.apache.spark.Partitioner is used to control the partitioning of each RDD.
      Parameters:
      updateFunc - State update function. Note, that this function may generate a different tuple with a different key than the input key. Therefore keys may be removed or added in this way. It is up to the developer to decide whether to remember the partitioner despite the key being changed.
      partitioner - Partitioner for controlling the partitioning of each RDD in the new DStream
      rememberPartitioner - Whether to remember the partitioner object in the generated RDDs.
      initialRDD - initial state value of each key.
      evidence$9 - (undocumented)
      Returns:
      (undocumented)
    • updateStateByKey

      public <S> DStream<scala.Tuple2<K,S>> updateStateByKey(scala.Function4<Time,K,scala.collection.Seq<V>,scala.Option<S>,scala.Option<S>> updateFunc, Partitioner partitioner, boolean rememberPartitioner, scala.Option<RDD<scala.Tuple2<K,S>>> initialRDD, scala.reflect.ClassTag<S> evidence$10)
      Return a new "state" DStream where the state for each key is updated by applying the given function on the previous state of the key and the new values of the key. In every batch the updateFunc will be called for each state even if there are no new values. org.apache.spark.Partitioner is used to control the partitioning of each RDD.
      Parameters:
      updateFunc - State update function. If this function returns None, then corresponding state key-value pair will be eliminated.
      partitioner - Partitioner for controlling the partitioning of each RDD in the new DStream.
      rememberPartitioner - (undocumented)
      initialRDD - (undocumented)
      evidence$10 - (undocumented)
      Returns:
      (undocumented)