Class/Object

org.apache.spark.streaming.api.java

JavaPairInputDStream

Related Docs: object JavaPairInputDStream | package java

Permalink

class JavaPairInputDStream[K, V] extends JavaPairDStream[K, V]

A Java-friendly interface to org.apache.spark.streaming.dstream.InputDStream of key-value pairs.

Linear Supertypes
JavaPairDStream[K, V], AbstractJavaDStreamLike[(K, V), JavaPairDStream[K, V], JavaPairRDD[K, V]], JavaDStreamLike[(K, V), JavaPairDStream[K, V], JavaPairRDD[K, V]], Serializable, Serializable, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. JavaPairInputDStream
  2. JavaPairDStream
  3. AbstractJavaDStreamLike
  4. JavaDStreamLike
  5. Serializable
  6. Serializable
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new JavaPairInputDStream(inputDStream: InputDStream[(K, V)])(implicit kClassTag: ClassTag[K], vClassTag: ClassTag[V])

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def cache(): JavaPairDStream[K, V]

    Permalink

    Persist RDDs of this DStream with the default storage level (MEMORY_ONLY_SER)

    Persist RDDs of this DStream with the default storage level (MEMORY_ONLY_SER)

    Definition Classes
    JavaPairDStream
  6. def checkpoint(interval: Duration): DStream[(K, V)]

    Permalink

    Enable periodic checkpointing of RDDs of this DStream.

    Enable periodic checkpointing of RDDs of this DStream.

    interval

    Time interval after which generated RDD will be checkpointed

    Definition Classes
    JavaDStreamLike
  7. val classTag: ClassTag[(K, V)]

    Permalink
    Definition Classes
    JavaPairDStreamJavaDStreamLike
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def cogroup[W](other: JavaPairDStream[K, W], partitioner: Partitioner): JavaPairDStream[K, (Iterable[V], Iterable[W])]

    Permalink

    Return a new DStream by applying 'cogroup' between RDDs of this DStream and other DStream.

    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.

    Definition Classes
    JavaPairDStream
  10. def cogroup[W](other: JavaPairDStream[K, W], numPartitions: Int): JavaPairDStream[K, (Iterable[V], Iterable[W])]

    Permalink

    Return a new DStream by applying 'cogroup' between RDDs of this DStream and other DStream.

    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.

    Definition Classes
    JavaPairDStream
  11. def cogroup[W](other: JavaPairDStream[K, W]): JavaPairDStream[K, (Iterable[V], Iterable[W])]

    Permalink

    Return a new DStream by applying 'cogroup' between RDDs of this DStream and other DStream.

    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.

    Definition Classes
    JavaPairDStream
  12. def combineByKey[C](createCombiner: Function[V, C], mergeValue: Function2[C, V, C], mergeCombiners: Function2[C, C, C], partitioner: Partitioner, mapSideCombine: Boolean): JavaPairDStream[K, C]

    Permalink

    Combine elements of each key in DStream's RDDs using custom function.

    Combine elements of each key in DStream's RDDs using custom function. This is similar to the combineByKey for RDDs. Please refer to combineByKey in org.apache.spark.rdd.PairRDDFunctions for more information.

    Definition Classes
    JavaPairDStream
  13. def combineByKey[C](createCombiner: Function[V, C], mergeValue: Function2[C, V, C], mergeCombiners: Function2[C, C, C], partitioner: Partitioner): JavaPairDStream[K, C]

    Permalink

    Combine elements of each key in DStream's RDDs using custom function.

    Combine elements of each key in DStream's RDDs using custom function. This is similar to the combineByKey for RDDs. Please refer to combineByKey in org.apache.spark.rdd.PairRDDFunctions for more information.

    Definition Classes
    JavaPairDStream
  14. def compute(validTime: Time): JavaPairRDD[K, V]

    Permalink

    Method that generates an RDD for the given Duration

    Method that generates an RDD for the given Duration

    Definition Classes
    JavaPairDStream
  15. def context(): StreamingContext

    Permalink

    Return the org.apache.spark.streaming.StreamingContext associated with this DStream

    Return the org.apache.spark.streaming.StreamingContext associated with this DStream

    Definition Classes
    JavaDStreamLike
  16. def count(): JavaDStream[Long]

    Permalink

    Return a new DStream in which each RDD has a single element generated by counting each RDD of this DStream.

    Return a new DStream in which each RDD has a single element generated by counting each RDD of this DStream.

    Definition Classes
    JavaDStreamLike
  17. def countByValue(numPartitions: Int): JavaPairDStream[(K, V), Long]

    Permalink

    Return a new DStream in which each RDD contains the counts of each distinct value in each RDD of this DStream.

    Return a new DStream in which each RDD contains the counts of each distinct value in each RDD of this DStream. Hash partitioning is used to generate the RDDs with numPartitions partitions.

    numPartitions

    number of partitions of each RDD in the new DStream.

    Definition Classes
    JavaDStreamLike
  18. def countByValue(): JavaPairDStream[(K, V), Long]

    Permalink

    Return a new DStream in which each RDD contains the counts of each distinct value in each RDD of this DStream.

    Return a new DStream in which each RDD contains the counts of each distinct value in each RDD of this DStream. Hash partitioning is used to generate the RDDs with Spark's default number of partitions.

    Definition Classes
    JavaDStreamLike
  19. def countByValueAndWindow(windowDuration: Duration, slideDuration: Duration, numPartitions: Int): JavaPairDStream[(K, V), Long]

    Permalink

    Return a new DStream in which each RDD contains the count of distinct elements in RDDs in a sliding window over this DStream.

    Return a new DStream in which each RDD contains the count of distinct elements in RDDs in a sliding window over this DStream. Hash partitioning is used to generate the RDDs with numPartitions partitions.

    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.

    Definition Classes
    JavaDStreamLike
  20. def countByValueAndWindow(windowDuration: Duration, slideDuration: Duration): JavaPairDStream[(K, V), Long]

    Permalink

    Return a new DStream in which each RDD contains the count of distinct elements in RDDs in a sliding window over this DStream.

    Return a new DStream in which each RDD contains the count of distinct elements in RDDs in a sliding window over this DStream. Hash partitioning is used to generate the RDDs with Spark's default number of partitions.

    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

    Definition Classes
    JavaDStreamLike
  21. def countByWindow(windowDuration: Duration, slideDuration: Duration): JavaDStream[Long]

    Permalink

    Return a new DStream in which each RDD has a single element generated by counting the number of elements in a window over this DStream.

    Return a new DStream in which each RDD has a single element generated by counting the number of elements in a window over this DStream. windowDuration and slideDuration are as defined in the window() operation. This is equivalent to window(windowDuration, slideDuration).count()

    Definition Classes
    JavaDStreamLike
  22. val dstream: DStream[(K, V)]

    Permalink
    Definition Classes
    JavaPairDStreamJavaDStreamLike
  23. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  24. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  25. def filter(f: Function[(K, V), Boolean]): JavaPairDStream[K, V]

    Permalink

    Return a new DStream containing only the elements that satisfy a predicate.

    Return a new DStream containing only the elements that satisfy a predicate.

    Definition Classes
    JavaPairDStream
  26. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  27. def flatMap[U](f: FlatMapFunction[(K, V), U]): JavaDStream[U]

    Permalink

    Return a new DStream by applying a function to all elements of this DStream, and then flattening the results

    Return a new DStream by applying a function to all elements of this DStream, and then flattening the results

    Definition Classes
    JavaDStreamLike
  28. def flatMapToPair[K2, V2](f: PairFlatMapFunction[(K, V), K2, V2]): JavaPairDStream[K2, V2]

    Permalink

    Return a new DStream by applying a function to all elements of this DStream, and then flattening the results

    Return a new DStream by applying a function to all elements of this DStream, and then flattening the results

    Definition Classes
    JavaDStreamLike
  29. def flatMapValues[U](f: Function[V, Iterable[U]]): JavaPairDStream[K, U]

    Permalink

    Return a new DStream by applying a flatmap function to the value of each key-value pairs in 'this' DStream without changing the key.

    Return a new DStream by applying a flatmap function to the value of each key-value pairs in 'this' DStream without changing the key.

    Definition Classes
    JavaPairDStream
  30. def foreachRDD(foreachFunc: VoidFunction2[JavaPairRDD[K, V], Time]): Unit

    Permalink

    Apply a function to each RDD in this DStream.

    Apply a function to each RDD in this DStream. This is an output operator, so 'this' DStream will be registered as an output stream and therefore materialized.

    Definition Classes
    JavaDStreamLike
  31. def foreachRDD(foreachFunc: VoidFunction[JavaPairRDD[K, V]]): Unit

    Permalink

    Apply a function to each RDD in this DStream.

    Apply a function to each RDD in this DStream. This is an output operator, so 'this' DStream will be registered as an output stream and therefore materialized.

    Definition Classes
    JavaDStreamLike
  32. def fullOuterJoin[W](other: JavaPairDStream[K, W], partitioner: Partitioner): JavaPairDStream[K, (Optional[V], Optional[W])]

    Permalink

    Return a new DStream by applying 'full outer join' between RDDs of this DStream and other DStream.

    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.

    Definition Classes
    JavaPairDStream
  33. def fullOuterJoin[W](other: JavaPairDStream[K, W], numPartitions: Int): JavaPairDStream[K, (Optional[V], Optional[W])]

    Permalink

    Return a new DStream by applying 'full outer join' between RDDs of this DStream and other DStream.

    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.

    Definition Classes
    JavaPairDStream
  34. def fullOuterJoin[W](other: JavaPairDStream[K, W]): JavaPairDStream[K, (Optional[V], Optional[W])]

    Permalink

    Return a new DStream by applying 'full outer join' between RDDs of this DStream and other DStream.

    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.

    Definition Classes
    JavaPairDStream
  35. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  36. def glom(): JavaDStream[List[(K, V)]]

    Permalink

    Return a new DStream in which each RDD is generated by applying glom() to each RDD of this DStream.

    Return a new DStream in which each RDD is generated by applying glom() to each RDD of this DStream. Applying glom() to an RDD coalesces all elements within each partition into an array.

    Definition Classes
    JavaDStreamLike
  37. def groupByKey(partitioner: Partitioner): JavaPairDStream[K, Iterable[V]]

    Permalink

    Return a new DStream by applying groupByKey on each RDD of this DStream.

    Return a new DStream by applying groupByKey on each RDD of this DStream. Therefore, the values for each key in this DStream's RDDs are grouped into a single sequence to generate the RDDs of the new DStream. org.apache.spark.Partitioner is used to control the partitioning of each RDD.

    Definition Classes
    JavaPairDStream
  38. def groupByKey(numPartitions: Int): JavaPairDStream[K, Iterable[V]]

    Permalink

    Return a new DStream by applying groupByKey to each RDD.

    Return a new DStream by applying groupByKey to each RDD. Hash partitioning is used to generate the RDDs with numPartitions partitions.

    Definition Classes
    JavaPairDStream
  39. def groupByKey(): JavaPairDStream[K, Iterable[V]]

    Permalink

    Return a new DStream by applying groupByKey to each RDD.

    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.

    Definition Classes
    JavaPairDStream
  40. def groupByKeyAndWindow(windowDuration: Duration, slideDuration: Duration, partitioner: Partitioner): JavaPairDStream[K, Iterable[V]]

    Permalink

    Return a new DStream by applying groupByKey over a sliding window on this DStream.

    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.

    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.

    Definition Classes
    JavaPairDStream
  41. def groupByKeyAndWindow(windowDuration: Duration, slideDuration: Duration, numPartitions: Int): JavaPairDStream[K, Iterable[V]]

    Permalink

    Return a new DStream by applying groupByKey over a sliding window on this DStream.

    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.

    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.

    Definition Classes
    JavaPairDStream
  42. def groupByKeyAndWindow(windowDuration: Duration, slideDuration: Duration): JavaPairDStream[K, Iterable[V]]

    Permalink

    Return a new DStream by applying groupByKey over a sliding window.

    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.

    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

    Definition Classes
    JavaPairDStream
  43. def groupByKeyAndWindow(windowDuration: Duration): JavaPairDStream[K, Iterable[V]]

    Permalink

    Return a new DStream by applying groupByKey over a sliding window.

    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.

    windowDuration

    width of the window; must be a multiple of this DStream's batching interval

    Definition Classes
    JavaPairDStream
  44. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  45. val inputDStream: InputDStream[(K, V)]

    Permalink
  46. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  47. def join[W](other: JavaPairDStream[K, W], partitioner: Partitioner): JavaPairDStream[K, (V, W)]

    Permalink

    Return a new DStream by applying 'join' between RDDs of this DStream and other DStream.

    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.

    Definition Classes
    JavaPairDStream
  48. def join[W](other: JavaPairDStream[K, W], numPartitions: Int): JavaPairDStream[K, (V, W)]

    Permalink

    Return a new DStream by applying 'join' between RDDs of this DStream and other DStream.

    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.

    Definition Classes
    JavaPairDStream
  49. def join[W](other: JavaPairDStream[K, W]): JavaPairDStream[K, (V, W)]

    Permalink

    Return a new DStream by applying 'join' between RDDs of this DStream and other DStream.

    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.

    Definition Classes
    JavaPairDStream
  50. implicit val kClassTag: ClassTag[K]

    Permalink
  51. implicit val kManifest: ClassTag[K]

    Permalink
    Definition Classes
    JavaPairDStream
  52. def leftOuterJoin[W](other: JavaPairDStream[K, W], partitioner: Partitioner): JavaPairDStream[K, (V, Optional[W])]

    Permalink

    Return a new DStream by applying 'left outer join' between RDDs of this DStream and other DStream.

    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.

    Definition Classes
    JavaPairDStream
  53. def leftOuterJoin[W](other: JavaPairDStream[K, W], numPartitions: Int): JavaPairDStream[K, (V, Optional[W])]

    Permalink

    Return a new DStream by applying 'left outer join' between RDDs of this DStream and other DStream.

    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.

    Definition Classes
    JavaPairDStream
  54. def leftOuterJoin[W](other: JavaPairDStream[K, W]): JavaPairDStream[K, (V, Optional[W])]

    Permalink

    Return a new DStream by applying 'left outer join' between RDDs of this DStream and other DStream.

    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.

    Definition Classes
    JavaPairDStream
  55. def map[R](f: Function[(K, V), R]): JavaDStream[R]

    Permalink

    Return a new DStream by applying a function to all elements of this DStream.

    Return a new DStream by applying a function to all elements of this DStream.

    Definition Classes
    JavaDStreamLike
  56. def mapPartitions[U](f: FlatMapFunction[Iterator[(K, V)], U]): JavaDStream[U]

    Permalink

    Return a new DStream in which each RDD is generated by applying mapPartitions() to each RDDs of this DStream.

    Return a new DStream in which each RDD is generated by applying mapPartitions() to each RDDs of this DStream. Applying mapPartitions() to an RDD applies a function to each partition of the RDD.

    Definition Classes
    JavaDStreamLike
  57. def mapPartitionsToPair[K2, V2](f: PairFlatMapFunction[Iterator[(K, V)], K2, V2]): JavaPairDStream[K2, V2]

    Permalink

    Return a new DStream in which each RDD is generated by applying mapPartitions() to each RDDs of this DStream.

    Return a new DStream in which each RDD is generated by applying mapPartitions() to each RDDs of this DStream. Applying mapPartitions() to an RDD applies a function to each partition of the RDD.

    Definition Classes
    JavaDStreamLike
  58. def mapToPair[K2, V2](f: PairFunction[(K, V), K2, V2]): JavaPairDStream[K2, V2]

    Permalink

    Return a new DStream by applying a function to all elements of this DStream.

    Return a new DStream by applying a function to all elements of this DStream.

    Definition Classes
    JavaDStreamLike
  59. def mapValues[U](f: Function[V, U]): JavaPairDStream[K, U]

    Permalink

    Return a new DStream by applying a map function to the value of each key-value pairs in 'this' DStream without changing the key.

    Return a new DStream by applying a map function to the value of each key-value pairs in 'this' DStream without changing the key.

    Definition Classes
    JavaPairDStream
  60. def mapWithState[StateType, MappedType](spec: StateSpec[K, V, StateType, MappedType]): JavaMapWithStateDStream[K, V, StateType, MappedType]

    Permalink

    :: Experimental :: Return a JavaMapWithStateDStream by applying a function to every key-value element of this stream, while maintaining some state data for each unique key.

    :: Experimental :: Return a JavaMapWithStateDStream 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
    Function3<String, Optional<Integer>, State<Integer>, String> mappingFunction =
        new Function3<String, Optional<Integer>, State<Integer>, String>() {
            @Override
            public Optional<String> call(Optional<Integer> value, State<Integer> state) {
                // Use state.exists(), state.get(), state.update() and state.remove()
                // to manage state, and return the necessary string
            }
        };
    
     JavaMapWithStateDStream<String, Integer, Integer, String> mapWithStateDStream =
         keyValueDStream.mapWithState(StateSpec.function(mappingFunc));
    StateType

    Class type of the state data

    MappedType

    Class type of the mapped data

    spec

    Specification of this transformation

    Definition Classes
    JavaPairDStream
    Annotations
    @Experimental()
  61. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  62. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  63. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  64. def persist(storageLevel: StorageLevel): JavaPairDStream[K, V]

    Permalink

    Persist the RDDs of this DStream with the given storage level

    Persist the RDDs of this DStream with the given storage level

    Definition Classes
    JavaPairDStream
  65. def persist(): JavaPairDStream[K, V]

    Permalink

    Persist RDDs of this DStream with the default storage level (MEMORY_ONLY_SER)

    Persist RDDs of this DStream with the default storage level (MEMORY_ONLY_SER)

    Definition Classes
    JavaPairDStream
  66. def print(num: Int): Unit

    Permalink

    Print the first num elements of each RDD generated in this DStream.

    Print the first num elements of each RDD generated in this DStream. This is an output operator, so this DStream will be registered as an output stream and there materialized.

    Definition Classes
    JavaDStreamLike
  67. def print(): Unit

    Permalink

    Print the first ten elements of each RDD generated in this DStream.

    Print the first ten elements of each RDD generated in this DStream. This is an output operator, so this DStream will be registered as an output stream and there materialized.

    Definition Classes
    JavaDStreamLike
  68. def reduce(f: Function2[(K, V), (K, V), (K, V)]): JavaDStream[(K, V)]

    Permalink

    Return a new DStream in which each RDD has a single element generated by reducing each RDD of this DStream.

    Return a new DStream in which each RDD has a single element generated by reducing each RDD of this DStream.

    Definition Classes
    JavaDStreamLike
  69. def reduceByKey(func: Function2[V, V, V], partitioner: Partitioner): JavaPairDStream[K, V]

    Permalink

    Return a new DStream by applying reduceByKey to each RDD.

    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.

    Definition Classes
    JavaPairDStream
  70. def reduceByKey(func: Function2[V, V, V], numPartitions: Int): JavaPairDStream[K, V]

    Permalink

    Return a new DStream by applying reduceByKey to each RDD.

    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.

    Definition Classes
    JavaPairDStream
  71. def reduceByKey(func: Function2[V, V, V]): JavaPairDStream[K, V]

    Permalink

    Return a new DStream by applying reduceByKey to each RDD.

    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.

    Definition Classes
    JavaPairDStream
  72. def reduceByKeyAndWindow(reduceFunc: Function2[V, V, V], invReduceFunc: Function2[V, V, V], windowDuration: Duration, slideDuration: Duration, partitioner: Partitioner, filterFunc: Function[(K, V), Boolean]): JavaPairDStream[K, V]

    Permalink

    Return a new DStream by applying incremental reduceByKey over a sliding window.

    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 reduce 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 that reduceByKeyAndWindow without "inverse reduce" function. However, it is applicable to only "invertible reduce functions".
    reduceFunc

    associative and commutative reduce function

    invReduceFunc

    inverse 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

    function to filter expired key-value pairs; only pairs that satisfy the function are retained set this to null if you do not want to filter

    Definition Classes
    JavaPairDStream
  73. def reduceByKeyAndWindow(reduceFunc: Function2[V, V, V], invReduceFunc: Function2[V, V, V], windowDuration: Duration, slideDuration: Duration, numPartitions: Int, filterFunc: Function[(K, V), Boolean]): JavaPairDStream[K, V]

    Permalink

    Return a new DStream by applying incremental reduceByKey over a sliding window.

    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 reduce 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 that reduceByKeyAndWindow without "inverse reduce" function. However, it is applicable to only "invertible reduce functions". Hash partitioning is used to generate the RDDs with numPartitions partitions.
    reduceFunc

    associative and commutative reduce function

    invReduceFunc

    inverse 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.

    filterFunc

    function to filter expired key-value pairs; only pairs that satisfy the function are retained set this to null if you do not want to filter

    Definition Classes
    JavaPairDStream
  74. def reduceByKeyAndWindow(reduceFunc: Function2[V, V, V], invReduceFunc: Function2[V, V, V], windowDuration: Duration, slideDuration: Duration): JavaPairDStream[K, V]

    Permalink

    Return a new DStream by reducing over a using incremental computation.

    Return a new DStream by reducing over a using incremental computation. The reduced value of over a new window is calculated using the old window's reduce 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 that 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.
    reduceFunc

    associative and commutative reduce function

    invReduceFunc

    inverse 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

    Definition Classes
    JavaPairDStream
  75. def reduceByKeyAndWindow(reduceFunc: Function2[V, V, V], windowDuration: Duration, slideDuration: Duration, partitioner: Partitioner): JavaPairDStream[K, V]

    Permalink

    Return a new DStream by applying reduceByKey over a sliding window.

    Return a new DStream by applying reduceByKey over a sliding window. Similar to DStream.reduceByKey(), but applies it over a sliding window.

    reduceFunc

    associative rand commutative educe 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.

    Definition Classes
    JavaPairDStream
  76. def reduceByKeyAndWindow(reduceFunc: Function2[V, V, V], windowDuration: Duration, slideDuration: Duration, numPartitions: Int): JavaPairDStream[K, V]

    Permalink

    Return a new DStream by applying reduceByKey over a sliding window.

    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.

    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.

    Definition Classes
    JavaPairDStream
  77. def reduceByKeyAndWindow(reduceFunc: Function2[V, V, V], windowDuration: Duration, slideDuration: Duration): JavaPairDStream[K, V]

    Permalink

    Return a new DStream by applying reduceByKey over a sliding window.

    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.

    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

    Definition Classes
    JavaPairDStream
  78. def reduceByKeyAndWindow(reduceFunc: Function2[V, V, V], windowDuration: Duration): JavaPairDStream[K, V]

    Permalink

    Create a new DStream by applying reduceByKey over a sliding window on this DStream.

    Create 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.

    reduceFunc

    associative and commutative reduce function

    windowDuration

    width of the window; must be a multiple of this DStream's batching interval

    Definition Classes
    JavaPairDStream
  79. def reduceByWindow(reduceFunc: Function2[(K, V), (K, V), (K, V)], invReduceFunc: Function2[(K, V), (K, V), (K, V)], windowDuration: Duration, slideDuration: Duration): JavaDStream[(K, V)]

    Permalink

    Return a new DStream in which each RDD has a single element generated by reducing all elements in a sliding window over this DStream.

    Return a new DStream in which each RDD has a single element generated by reducing all elements in a sliding window over this DStream. However, the reduction is done incrementally 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 reduceByWindow without "inverse reduce" function. However, it is applicable to only "invertible reduce functions".
    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

    Definition Classes
    JavaDStreamLike
  80. def reduceByWindow(reduceFunc: Function2[(K, V), (K, V), (K, V)], windowDuration: Duration, slideDuration: Duration): JavaDStream[(K, V)]

    Permalink

    Return a new DStream in which each RDD has a single element generated by reducing all elements in a sliding window over this DStream.

    Return a new DStream in which each RDD has a single element generated by reducing all elements in a sliding window over this DStream.

    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

    Definition Classes
    JavaDStreamLike
  81. def repartition(numPartitions: Int): JavaPairDStream[K, V]

    Permalink

    Return a new DStream with an increased or decreased level of parallelism.

    Return a new DStream with an increased or decreased level of parallelism. Each RDD in the returned DStream has exactly numPartitions partitions.

    Definition Classes
    JavaPairDStream
  82. def rightOuterJoin[W](other: JavaPairDStream[K, W], partitioner: Partitioner): JavaPairDStream[K, (Optional[V], W)]

    Permalink

    Return a new DStream by applying 'right outer join' between RDDs of this DStream and other DStream.

    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.

    Definition Classes
    JavaPairDStream
  83. def rightOuterJoin[W](other: JavaPairDStream[K, W], numPartitions: Int): JavaPairDStream[K, (Optional[V], W)]

    Permalink

    Return a new DStream by applying 'right outer join' between RDDs of this DStream and other DStream.

    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.

    Definition Classes
    JavaPairDStream
  84. def rightOuterJoin[W](other: JavaPairDStream[K, W]): JavaPairDStream[K, (Optional[V], W)]

    Permalink

    Return a new DStream by applying 'right outer join' between RDDs of this DStream and other DStream.

    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.

    Definition Classes
    JavaPairDStream
  85. def saveAsHadoopFiles[F <: OutputFormat[_, _]](prefix: String, suffix: String, keyClass: Class[_], valueClass: Class[_], outputFormatClass: Class[F], conf: JobConf): Unit

    Permalink

    Save each RDD in this DStream as a Hadoop file.

    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".

    Definition Classes
    JavaPairDStream
  86. def saveAsHadoopFiles[F <: OutputFormat[_, _]](prefix: String, suffix: String, keyClass: Class[_], valueClass: Class[_], outputFormatClass: Class[F]): Unit

    Permalink

    Save each RDD in this DStream as a Hadoop file.

    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".

    Definition Classes
    JavaPairDStream
  87. def saveAsHadoopFiles(prefix: String, suffix: String): Unit

    Permalink

    Save each RDD in this DStream as a Hadoop file.

    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".

    Definition Classes
    JavaPairDStream
  88. def saveAsNewAPIHadoopFiles[F <: OutputFormat[_, _]](prefix: String, suffix: String, keyClass: Class[_], valueClass: Class[_], outputFormatClass: Class[F], conf: Configuration = ...): Unit

    Permalink

    Save each RDD in this DStream as a Hadoop file.

    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".

    Definition Classes
    JavaPairDStream
  89. def saveAsNewAPIHadoopFiles[F <: OutputFormat[_, _]](prefix: String, suffix: String, keyClass: Class[_], valueClass: Class[_], outputFormatClass: Class[F]): Unit

    Permalink

    Save each RDD in this DStream as a Hadoop file.

    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".

    Definition Classes
    JavaPairDStream
  90. def saveAsNewAPIHadoopFiles(prefix: String, suffix: String): Unit

    Permalink

    Save each RDD in this DStream as a Hadoop file.

    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".

    Definition Classes
    JavaPairDStream
  91. implicit def scalaIntToJavaLong(in: DStream[Long]): JavaDStream[Long]

    Permalink
    Definition Classes
    JavaDStreamLike
  92. def slice(fromTime: Time, toTime: Time): List[JavaPairRDD[K, V]]

    Permalink

    Return all the RDDs between 'fromDuration' to 'toDuration' (both included)

    Return all the RDDs between 'fromDuration' to 'toDuration' (both included)

    Definition Classes
    JavaDStreamLike
  93. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  94. def toJavaDStream(): JavaDStream[(K, V)]

    Permalink

    Convert to a JavaDStream

    Convert to a JavaDStream

    Definition Classes
    JavaPairDStream
  95. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  96. def transform[U](transformFunc: Function2[JavaPairRDD[K, V], Time, JavaRDD[U]]): JavaDStream[U]

    Permalink

    Return a new DStream in which each RDD is generated by applying a function on each RDD of 'this' DStream.

    Return a new DStream in which each RDD is generated by applying a function on each RDD of 'this' DStream.

    Definition Classes
    JavaDStreamLike
  97. def transform[U](transformFunc: Function[JavaPairRDD[K, V], JavaRDD[U]]): JavaDStream[U]

    Permalink

    Return a new DStream in which each RDD is generated by applying a function on each RDD of 'this' DStream.

    Return a new DStream in which each RDD is generated by applying a function on each RDD of 'this' DStream.

    Definition Classes
    JavaDStreamLike
  98. def transformToPair[K2, V2](transformFunc: Function2[JavaPairRDD[K, V], Time, JavaPairRDD[K2, V2]]): JavaPairDStream[K2, V2]

    Permalink

    Return a new DStream in which each RDD is generated by applying a function on each RDD of 'this' DStream.

    Return a new DStream in which each RDD is generated by applying a function on each RDD of 'this' DStream.

    Definition Classes
    JavaDStreamLike
  99. def transformToPair[K2, V2](transformFunc: Function[JavaPairRDD[K, V], JavaPairRDD[K2, V2]]): JavaPairDStream[K2, V2]

    Permalink

    Return a new DStream in which each RDD is generated by applying a function on each RDD of 'this' DStream.

    Return a new DStream in which each RDD is generated by applying a function on each RDD of 'this' DStream.

    Definition Classes
    JavaDStreamLike
  100. def transformWith[K2, V2, W](other: JavaPairDStream[K2, V2], transformFunc: Function3[JavaPairRDD[K, V], JavaPairRDD[K2, V2], Time, JavaRDD[W]]): JavaDStream[W]

    Permalink

    Return a new DStream in which each RDD is generated by applying a function on each RDD of 'this' DStream and 'other' DStream.

    Return a new DStream in which each RDD is generated by applying a function on each RDD of 'this' DStream and 'other' DStream.

    Definition Classes
    JavaDStreamLike
  101. def transformWith[U, W](other: JavaDStream[U], transformFunc: Function3[JavaPairRDD[K, V], JavaRDD[U], Time, JavaRDD[W]]): JavaDStream[W]

    Permalink

    Return a new DStream in which each RDD is generated by applying a function on each RDD of 'this' DStream and 'other' DStream.

    Return a new DStream in which each RDD is generated by applying a function on each RDD of 'this' DStream and 'other' DStream.

    Definition Classes
    JavaDStreamLike
  102. def transformWithToPair[K2, V2, K3, V3](other: JavaPairDStream[K2, V2], transformFunc: Function3[JavaPairRDD[K, V], JavaPairRDD[K2, V2], Time, JavaPairRDD[K3, V3]]): JavaPairDStream[K3, V3]

    Permalink

    Return a new DStream in which each RDD is generated by applying a function on each RDD of 'this' DStream and 'other' DStream.

    Return a new DStream in which each RDD is generated by applying a function on each RDD of 'this' DStream and 'other' DStream.

    Definition Classes
    JavaDStreamLike
  103. def transformWithToPair[U, K2, V2](other: JavaDStream[U], transformFunc: Function3[JavaPairRDD[K, V], JavaRDD[U], Time, JavaPairRDD[K2, V2]]): JavaPairDStream[K2, V2]

    Permalink

    Return a new DStream in which each RDD is generated by applying a function on each RDD of 'this' DStream and 'other' DStream.

    Return a new DStream in which each RDD is generated by applying a function on each RDD of 'this' DStream and 'other' DStream.

    Definition Classes
    JavaDStreamLike
  104. def union(that: JavaPairDStream[K, V]): JavaPairDStream[K, V]

    Permalink

    Return a new DStream by unifying data of another DStream with this DStream.

    Return a new DStream by unifying data of another DStream with this DStream.

    that

    Another DStream having the same interval (i.e., slideDuration) as this DStream.

    Definition Classes
    JavaPairDStream
  105. def updateStateByKey[S](updateFunc: Function2[List[V], Optional[S], Optional[S]], partitioner: Partitioner, initialRDD: JavaPairRDD[K, S]): JavaPairDStream[K, S]

    Permalink

    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.

    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. org.apache.spark.Partitioner is used to control the partitioning of each RDD.

    S

    State type

    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.

    Definition Classes
    JavaPairDStream
  106. def updateStateByKey[S](updateFunc: Function2[List[V], Optional[S], Optional[S]], partitioner: Partitioner): JavaPairDStream[K, S]

    Permalink

    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.

    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. org.apache.spark.Partitioner is used to control the partitioning of each RDD.

    S

    State type

    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.

    Definition Classes
    JavaPairDStream
  107. def updateStateByKey[S](updateFunc: Function2[List[V], Optional[S], Optional[S]], numPartitions: Int): JavaPairDStream[K, S]

    Permalink

    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.

    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. Hash partitioning is used to generate the RDDs with numPartitions partitions.

    S

    State type

    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.

    Definition Classes
    JavaPairDStream
  108. def updateStateByKey[S](updateFunc: Function2[List[V], Optional[S], Optional[S]]): JavaPairDStream[K, S]

    Permalink

    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.

    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. Hash partitioning is used to generate the RDDs with Spark's default number of partitions.

    S

    State type

    updateFunc

    State update function. If this function returns None, then corresponding state key-value pair will be eliminated.

    Definition Classes
    JavaPairDStream
  109. implicit val vClassTag: ClassTag[V]

    Permalink
  110. implicit val vManifest: ClassTag[V]

    Permalink
    Definition Classes
    JavaPairDStream
  111. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  112. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  113. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  114. def window(windowDuration: Duration, slideDuration: Duration): JavaPairDStream[K, V]

    Permalink

    Return a new DStream which is computed based on windowed batches of this DStream.

    Return a new DStream which is computed based on windowed batches of this DStream.

    windowDuration

    duration (i.e., width) of the window; must be a multiple of this DStream's 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 interval

    Definition Classes
    JavaPairDStream
  115. def window(windowDuration: Duration): JavaPairDStream[K, V]

    Permalink

    Return a new DStream which is computed based on windowed batches of this DStream.

    Return a new DStream which is computed based on windowed batches of this DStream. The new DStream generates RDDs with the same interval as this DStream.

    windowDuration

    width of the window; must be a multiple of this DStream's interval.

    Definition Classes
    JavaPairDStream
  116. def wrapRDD(rdd: RDD[(K, V)]): JavaPairRDD[K, V]

    Permalink
    Definition Classes
    JavaPairDStreamJavaDStreamLike

Inherited from JavaPairDStream[K, V]

Inherited from AbstractJavaDStreamLike[(K, V), JavaPairDStream[K, V], JavaPairRDD[K, V]]

Inherited from JavaDStreamLike[(K, V), JavaPairDStream[K, V], JavaPairRDD[K, V]]

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped