@Override
    public void execute(StreamingCinchContext cinchContext, SparkConf sparkConf)  {
        JavaStreamingContext streamingContext = new JavaStreamingContext(sparkConf, new Duration(durationInMillis));

        defineJob(streamingContext, cinchContext);

        streamingContext.start();
        streamingContext.awaitTermination();
    }
@ Override public void execute ( StreamingCinchContext cinchContext , SparkConf sparkConf ) { JavaStreamingContext streamingContext = new JavaStreamingContext ( sparkConf , new Duration ( durationInMillis ) ) ; defineJob ( streamingContext , cinchContext ) ; streamingContext . start ( ) ; streamingContext . awaitTermination ( ) ; }
Execute cinch job with context and spark conf.