The java guide.
You'll need Spark, maven and java. Follow this tutorial to install spark : https://www.tutorialspoint.com/apache_spark/apache_spark_installation.htm
A stateless operation
Count the words that occurs instantanously.
A stateless operation
Count the Errors that occurs instantanously.
A statefull operation
Count the whole Errors that occured since the beginning.
A statefull operation
Count the whole Errors that occured within a sliding window of time.
To run the examples you have to open a scoket where we will write text to simulate input streams.
Open a socket on port 9999 using netcat utility.
$ nc -lk 9999
Clone the project, get inside and run on a shell
$ mvn install
$ mvn clean package
Using spark-submit
$ spark-submit --class spark.streaming.WordCount target/spark-streaming-examples-1.0.jar localhost 9999
To launch the other examples, just change the class name : --class spark.streaming.ClassName
On the shell where netcat was launch, write textes
I'm writing text
it is fun
You'll see the processing results instantanously.
When the Streaming app is running, you could monitor using the spark UI : http://localhost:4040/