private void startSparkStreamingContext(Properties sparkConfigs,
											final SparkStreamingSupport sparkStreamingSupport,
											final Module module) {
		final Receiver receiver = module.getComponent(Receiver.class);
		Environment env = this.getApplicationContext().getEnvironment();
		String masterURL = env.getProperty(SparkStreamingSupport.SPARK_MASTER_URL_PROP,
				SparkStreamingSupport.SPARK_DEFAULT_MASTER_URL);
		final SparkConf sparkConf = setupSparkConf(module, masterURL, sparkConfigs);
		final String batchInterval = env.getProperty(SparkStreamingSupport.SPARK_STREAMING_BATCH_INTERVAL_MODULE_OPTION,
				env.getProperty(SparkStreamingSupport.SPARK_STREAMING_BATCH_INTERVAL_PROP,
						SparkStreamingSupport.SPARK_STREAMING_DEFAULT_BATCH_INTERVAL));
		final SparkStreamingListener streamingListener = new SparkStreamingListener();

		final SparkMessageSender sender =
				(module.getType()==ModuleType.processor) ? module.getComponent(SparkMessageSender.class) : null;
		final StreamingContext streamingContext = new StreamingContext(sparkConf, new Duration(Long.valueOf(batchInterval)));
		streamingContext.addStreamingListener(streamingListener);
		Executors.newSingleThreadExecutor().execute(new Runnable() {
			@Override
			@SuppressWarnings("unchecked")
			public void run() {
				try {
					JavaStreamingContext javaStreamingContext = new JavaStreamingContext(streamingContext);
					streamingContexts.put(module, javaStreamingContext);
					JavaReceiverInputDStream javaInputDStream = javaStreamingContext.receiverStream(receiver);
					if (sparkStreamingSupport instanceof Processor) {
						new ModuleExecutor().execute(javaInputDStream, (Processor) sparkStreamingSupport, sender);
					}
					if (sparkStreamingSupport instanceof org.springframework.xd.spark.streaming.scala.Processor) {
						ReceiverInputDStream receiverInput = javaInputDStream.receiverInputDStream();
						new org.springframework.xd.spark.streaming.scala.ModuleExecutor().execute(receiverInput,
								(org.springframework.xd.spark.streaming.scala.Processor) sparkStreamingSupport, sender);
					}
					javaStreamingContext.start();
					javaStreamingContext.awaitTermination();
				}
				catch (Exception e) {
					throw new IllegalStateException("Exception when running Spark Streaming application.", e);
				}
			}
		});
		try {
			boolean started = streamingListener.receiverStartLatch.await(30, TimeUnit.SECONDS);
			if (!started) {
				logger.warn("Deployment timed out when deploying Spark Streaming module " + sparkStreamingSupport);
			}
			if (!streamingListener.receiverStartSuccess.get()) {
				throw new IllegalStateException("Failed to start Spark Streaming Receiver");
			}
		}
		catch (InterruptedException ie) {
			throw new RuntimeException(ie);
		}
	}
Start spark streaming context for the given streaming processor.

@param sparkConfigs the spark configuration properties
@param sparkStreamingSupport the underlying processor implementation
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/plugins/spark/streaming/SparkStreamingPlugin.java