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.
The supplied org.apache.spark.Partitioner is used to partition the generated RDDs.
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.
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.
Combine elements of each key in DStream's RDDs using custom functions.
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.
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 '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.
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.
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.
Return a new DStream by applying groupByKey
on each RDD.
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.
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.
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.
Create a new DStream by applying groupByKey
over a sliding window on this
DStream.
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.
width of the window; must be a multiple of this DStream's batching interval
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 for controlling the partitioning of each RDD in the new DStream.
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.
width of the window; must be a multiple of this DStream's batching interval
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
number of partitions of each RDD in the new DStream; if not specified then Spark's default number of partitions will be used
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.
width of the window; must be a multiple of this DStream's batching interval
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
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.
width of the window; must be a multiple of this DStream's batching interval
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.
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.
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.
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.
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.
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.
Return a new DStream by applying a map function to the value of each key-value pairs in 'this' DStream without changing the key.
:: Experimental ::
Return a MapWithStateDStream by applying a function to every key-value element of
this
stream, while maintaining some state data for each unique key.
:: Experimental ::
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)
Class type of the state data
Class type of the mapped data
Specification of this transformation
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.
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.
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.
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 reduced value :
associative and commutative reduce function
inverse reduce function
width of the window; must be a multiple of this DStream's batching interval
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 for controlling the partitioning of each RDD in the new DStream.
Optional function to filter expired key-value pairs; only pairs that satisfy the function are retained
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 reduced value :
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.
associative and commutative reduce function
inverse reduce function; such that for all y, invertible x:
invReduceFunc(reduceFunc(x, y), x) = y
width of the window; must be a multiple of this DStream's batching interval
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
Optional function to filter expired key-value pairs; only pairs that satisfy the function are retained
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.
associative and commutative reduce function
width of the window; must be a multiple of this DStream's batching interval
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 for controlling the partitioning of each RDD in the new DStream.
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.
associative and commutative reduce function
width of the window; must be a multiple of this DStream's batching interval
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
number of partitions of each RDD in the new DStream.
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.
associative and commutative reduce function
width of the window; must be a multiple of this DStream's batching interval
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
Return a new DStream by applying reduceByKey
over a sliding window on this
DStream.
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.
associative and commutative reduce function
width of the window; must be a multiple of this DStream's batching interval
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.
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.
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.
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"
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"
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".
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".
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.
State type
State update function. If this
function returns None, then
corresponding state key-value pair will be eliminated.
Partitioner for controlling the partitioning of each RDD in the new DStream.
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. org.apache.spark.Partitioner is used to control the partitioning of each RDD.
State type
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 for controlling the partitioning of each RDD in the new DStream
Whether to remember the partitioner object in the generated RDDs.
initial state value 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 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.
State type
State update function. If this
function returns None, then
corresponding state key-value pair will be eliminated.
Partitioner for controlling the partitioning of each RDD in the new DStream.
initial state value 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.
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. org.apache.spark.Partitioner is used to control the partitioning of each RDD.
State type
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 for controlling the partitioning of each RDD in the new DStream
Whether to remember the partitioner object in the generated RDDs.
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.
State type
State update function. If this
function returns None, then
corresponding state key-value pair will be eliminated.
Partitioner for controlling the partitioning of each RDD in the new DStream.
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.
State type
State update function. If this
function returns None, then
corresponding state key-value pair will be eliminated.
Number of partitions of each RDD in the new DStream.
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.
State type
State update function. If this
function returns None, then
corresponding state key-value pair will be eliminated.
Extra functions available on DStream of (key, value) pairs through an implicit conversion.