Counts words cumulatively in UTF8 encoded, '\n' delimited text received from the network every
second starting with initial value of word count.
Usage: StatefulNetworkWordCount <hostname> <port>
<hostname> and <port> describe the TCP server that Spark Streaming would connect to receive
data.
To run this on your local machine, you need to first run a Netcat server
$ nc -lk 9999
and then run the example
$ bin/run-example
org.apache.spark.examples.streaming.StatefulNetworkWordCount localhost 9999
Counts words cumulatively in UTF8 encoded, '\n' delimited text received from the network every second starting with initial value of word count. Usage: StatefulNetworkWordCount <hostname> <port> <hostname> and <port> describe the TCP server that Spark Streaming would connect to receive data.
To run this on your local machine, you need to first run a Netcat server
$ nc -lk 9999
and then run the example$ bin/run-example org.apache.spark.examples.streaming.StatefulNetworkWordCount localhost 9999