use of org.apache.spark.streaming.api.java.JavaStreamingContext in project spark-dataflow by cloudera.
the class SparkPipelineRunner method createStreamingEvaluationContext.
private EvaluationContext createStreamingEvaluationContext(JavaSparkContext jsc, Pipeline pipeline, Duration batchDuration) {
SparkStreamingPipelineOptions streamingOptions = (SparkStreamingPipelineOptions) mOptions;
JavaStreamingContext jssc = new JavaStreamingContext(jsc, batchDuration);
return new StreamingEvaluationContext(jsc, pipeline, jssc, streamingOptions.getTimeout());
}
Aggregations