org.apache.spark.streaming.api.java

JavaInputDStream

class JavaInputDStream[T] extends JavaDStream[T]

A Java-friendly interface to org.apache.spark.streaming.dstream.InputDStream.

Linear Supertypes
JavaDStream[T], AbstractJavaDStreamLike[T, JavaDStream[T], JavaRDD[T]], JavaDStreamLike[T, JavaDStream[T], JavaRDD[T]], Serializable, Serializable, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. JavaInputDStream
  2. JavaDStream
  3. AbstractJavaDStreamLike
  4. JavaDStreamLike
  5. Serializable
  6. Serializable
  7. AnyRef
  8. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new JavaInputDStream(inputDStream: InputDStream[T])(implicit classTag: ClassTag[T])

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def cache(): JavaDStream[T]

    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
    JavaDStream
  8. def checkpoint(interval: Duration): DStream[T]

    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
  9. implicit val classTag: ClassTag[T]

    Definition Classes
    JavaInputDStreamJavaDStreamJavaDStreamLike
  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. def compute(validTime: Time): JavaRDD[T]

    Generate an RDD for the given duration

    Generate an RDD for the given duration

    Definition Classes
    JavaDStream
  12. def context(): StreamingContext

    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
  13. def count(): JavaDStream[Long]

    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
  14. def countByValue(numPartitions: Int): JavaPairDStream[T, Long]

    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
  15. def countByValue(): JavaPairDStream[T, Long]

    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
  16. def countByValueAndWindow(windowDuration: Duration, slideDuration: Duration, numPartitions: Int): JavaPairDStream[T, Long]

    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
  17. def countByValueAndWindow(windowDuration: Duration, slideDuration: Duration): JavaPairDStream[T, Long]

    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
  18. def countByWindow(windowDuration: Duration, slideDuration: Duration): JavaDStream[Long]

    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
  19. val dstream: DStream[T]

    Definition Classes
    JavaDStreamJavaDStreamLike
  20. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  22. def filter(f: Function[T, Boolean]): JavaDStream[T]

    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
    JavaDStream
  23. def finalize(): Unit

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

    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
  25. def flatMapToPair[K2, V2](f: PairFlatMapFunction[T, K2, V2]): JavaPairDStream[K2, V2]

    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
  26. def foreachRDD(foreachFunc: Function2[JavaRDD[T], Time, Void]): Unit

    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
  27. def foreachRDD(foreachFunc: Function[JavaRDD[T], Void]): Unit

    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
  28. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  29. def glom(): JavaDStream[List[T]]

    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
  30. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  31. val inputDStream: InputDStream[T]

  32. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  33. def map[R](f: Function[T, R]): JavaDStream[R]

    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
  34. def mapPartitions[U](f: FlatMapFunction[Iterator[T], U]): JavaDStream[U]

    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
  35. def mapPartitionsToPair[K2, V2](f: PairFlatMapFunction[Iterator[T], K2, V2]): JavaPairDStream[K2, V2]

    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
  36. def mapToPair[K2, V2](f: PairFunction[T, K2, V2]): JavaPairDStream[K2, V2]

    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
  37. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  38. final def notify(): Unit

    Definition Classes
    AnyRef
  39. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  40. def persist(storageLevel: StorageLevel): JavaDStream[T]

    Persist the RDDs of this DStream with the given storage level

    Persist the RDDs of this DStream with the given storage level

    Definition Classes
    JavaDStream
  41. def persist(): JavaDStream[T]

    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
    JavaDStream
  42. def print(num: Int): Unit

    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
  43. def print(): Unit

    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
  44. def reduce(f: Function2[T, T, T]): JavaDStream[T]

    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
  45. def reduceByWindow(reduceFunc: Function2[T, T, T], invReduceFunc: Function2[T, T, T], windowDuration: Duration, slideDuration: Duration): JavaDStream[T]

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

    Definition Classes
    JavaDStreamLike
  46. def reduceByWindow(reduceFunc: Function2[T, T, T], windowDuration: Duration, slideDuration: Duration): JavaDStream[T]

    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 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
  47. def repartition(numPartitions: Int): JavaDStream[T]

    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
    JavaDStream
  48. implicit def scalaIntToJavaLong(in: DStream[Long]): JavaDStream[Long]

    Definition Classes
    JavaDStreamLike
  49. def slice(fromTime: Time, toTime: Time): List[JavaRDD[T]]

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

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

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

    Definition Classes
    AnyRef
  51. def toString(): String

    Definition Classes
    AnyRef → Any
  52. def transform[U](transformFunc: Function2[JavaRDD[T], Time, JavaRDD[U]]): JavaDStream[U]

    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
  53. def transform[U](transformFunc: Function[JavaRDD[T], JavaRDD[U]]): JavaDStream[U]

    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
  54. def transformToPair[K2, V2](transformFunc: Function2[JavaRDD[T], Time, JavaPairRDD[K2, V2]]): JavaPairDStream[K2, V2]

    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
  55. def transformToPair[K2, V2](transformFunc: Function[JavaRDD[T], JavaPairRDD[K2, V2]]): JavaPairDStream[K2, V2]

    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
  56. def transformWith[K2, V2, W](other: JavaPairDStream[K2, V2], transformFunc: Function3[JavaRDD[T], JavaPairRDD[K2, V2], Time, JavaRDD[W]]): JavaDStream[W]

    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
  57. def transformWith[U, W](other: JavaDStream[U], transformFunc: Function3[JavaRDD[T], JavaRDD[U], Time, JavaRDD[W]]): JavaDStream[W]

    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
  58. def transformWithToPair[K2, V2, K3, V3](other: JavaPairDStream[K2, V2], transformFunc: Function3[JavaRDD[T], JavaPairRDD[K2, V2], Time, JavaPairRDD[K3, V3]]): JavaPairDStream[K3, V3]

    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
  59. def transformWithToPair[U, K2, V2](other: JavaDStream[U], transformFunc: Function3[JavaRDD[T], JavaRDD[U], Time, JavaPairRDD[K2, V2]]): JavaPairDStream[K2, V2]

    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
  60. def union(that: JavaDStream[T]): JavaDStream[T]

    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
    JavaDStream
  61. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  64. def window(windowDuration: Duration, slideDuration: Duration): JavaDStream[T]

    Return a new DStream in which each RDD contains all the elements in seen in a sliding window of time over this DStream.

    Return a new DStream in which each RDD contains all the elements in seen in a sliding window of time over this DStream.

    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
    JavaDStream
  65. def window(windowDuration: Duration): JavaDStream[T]

    Return a new DStream in which each RDD contains all the elements in seen in a sliding window of time over this DStream.

    Return a new DStream in which each RDD contains all the elements in seen in a sliding window of time over 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
    JavaDStream
  66. def wrapRDD(rdd: RDD[T]): JavaRDD[T]

    Definition Classes
    JavaDStreamJavaDStreamLike

Deprecated Value Members

  1. def foreach(foreachFunc: Function2[JavaRDD[T], Time, Void]): Unit

    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
    Annotations
    @deprecated
    Deprecated

    (Since version 0.9.0) Use foreachRDD

  2. def foreach(foreachFunc: Function[JavaRDD[T], Void]): Unit

    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
    Annotations
    @deprecated
    Deprecated

    (Since version 0.9.0) Use foreachRDD

  3. def reduceByWindow(reduceFunc: (T, T) ⇒ T, windowDuration: Duration, slideDuration: Duration): DStream[T]

    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 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
    Annotations
    @deprecated
    Deprecated

    (Since version 1.3.0) Use Java-compatible version of reduceByWindow

Inherited from JavaDStream[T]

Inherited from AbstractJavaDStreamLike[T, JavaDStream[T], JavaRDD[T]]

Inherited from JavaDStreamLike[T, JavaDStream[T], JavaRDD[T]]

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped