Constructor
new StreamingContext(sparkContext, duration)
Parameters:
Name | Type | Description |
---|---|---|
sparkContext |
SparkContex | |
duration |
module:eclairjs/streaming.Duration |
- Source:
Methods
awaitTermination()
Wait for the execution to stop
- Source:
awaitTerminationOrTimeout(millis) → {boolean}
Wait for the execution to stop, or timeout
Parameters:
Name | Type | Description |
---|---|---|
millis |
long |
- Source:
Returns:
- Type
- boolean
queueStream(queue, oneAtATimeopt, defaultRDDopt) → {module:eclairjs/streaming/dstream.DStream}
Create an input stream from an queue of RDDs. In each batch,
it will process either one or all of the RDDs returned by the queue.
NOTE:
1. Changes to the queue after the stream is created will not be recognized.
2. Arbitrary RDDs can be added to `queueStream`, there is no way to recover data of
those RDDs, so `queueStream` doesn't support checkpointing.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
queue |
Array.<module:eclairjs.RDD> | Queue of RDDs | ||
oneAtATime |
boolean |
<optional> |
true | Whether only one RDD should be consumed from the queue in every interval |
defaultRDD |
module:eclairjs.RDD |
<optional> |
Default RDD is returned by the DStream when the queue is empty |
- Source:
Returns:
socketTextStream(host, port) → {module:eclairjs/streaming/dstream.DStream}
Create a input stream from TCP source hostname:port.
Parameters:
Name | Type | Description |
---|---|---|
host |
string | |
port |
string |
- Source:
Returns:
sparkContext() → {module:eclairjs.SparkContext}
The underlying SparkContext
- Source:
Returns:
start()
Start the execution of the streams.
- Source:
stop()
Stops the execution of the streams.
- Source: