Skip to content
Snippets Groups Projects
Commit 2d9eca9f authored by Matei Zaharia's avatar Matei Zaharia
Browse files

Merge pull request #447 from pwendell/streaming-constructor

Streaming constructor which takes JavaSparkContext
parents f6ec547e 7eea64aa
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,14 @@ class JavaStreamingContext(val ssc: StreamingContext) {
def this(master: String, frameworkName: String, batchDuration: Duration) =
this(new StreamingContext(master, frameworkName, batchDuration))
/**
* Creates a StreamingContext.
* @param sparkContext The underlying JavaSparkContext to use
* @param batchDuration The time interval at which streaming data will be divided into batches
*/
def this(sparkContext: JavaSparkContext, batchDuration: Duration) =
this(new StreamingContext(sparkContext.sc, batchDuration))
/**
* Re-creates a StreamingContext from a checkpoint file.
* @param path Path either to the directory that was specified as the checkpoint directory, or
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment