Counts words in new text files created in the given directory
Usage: HdfsWordCount <master> <directory>
<master> is the Spark master URL.
<directory> is the directory that Spark Streaming will use to find and read new text files.
To run this on your local machine on directory localdir, run this example
$ ./bin/run-example org.apache.spark.streaming.examples.HdfsWordCount local[2] localdir
Then create a text file in localdir and the words in the file will get counted.
Counts words in new text files created in the given directory Usage: HdfsWordCount <master> <directory> <master> is the Spark master URL. <directory> is the directory that Spark Streaming will use to find and read new text files.
To run this on your local machine on directory
localdir
, run this example$ ./bin/run-example org.apache.spark.streaming.examples.HdfsWordCount local[2] localdir
Then create a text file inlocaldir
and the words in the file will get counted.