Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

4nodejs/spark-twitter-stream-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

21 Commits

Repository files navigation

Twitter example

A few lines of code to demo how streaming works. To make it work on your machine, be sure to add a twitter4j.properties under src/main/resources that includes the following information:

oauth.consumerKey=***
oauth.consumerSecret=***
oauth.accessToken=***
oauth.accessTokenSecret=***

Visit apps.twitter.com to get your own API keys.

To submit the job to an existing Spark installation you can package the job with the following command

sbt assembly

and then submit it

$SPARK_HOME/bin/spark-submit \
 --class me.baghino.spark.intro.TwitterExample \
 --master $SPARK_MASTER \
 target/scala-2.11/spark-twitter-stream-example-assembly-0.0.1.jar

About

An example with Spark streaming for my introductory talk.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Scala 100.0%

AltStyle によって変換されたページ (->オリジナル) /