Does nothing get printed on the screen? If you are not getting any tweets
but spark streaming is running successfully you should get at least counts
being printed every batch (which would be zero). But they are not being
printed either, check the spark web ui to see stages are running or not. If
they are not, you may not have enough cores to run.

TD


On Fri, Jul 11, 2014 at 7:09 PM, Soumya Simanta <soumya.sima...@gmail.com>
wrote:

> Try running a simple standalone program if you are using Scala and see if
> you are getting any data. I use this to debug any connection/twitter4j
> issues.
>
>
> import twitter4j._
>
>
> //put your keys and creds here
> object Util {
>   val config = new twitter4j.conf.ConfigurationBuilder()
>     .setOAuthConsumerKey("")
>     .setOAuthConsumerSecret("")
>     .setOAuthAccessToken("")
>     .setOAuthAccessTokenSecret("")
>     .build
> }
>
>
> /**
>  *   Add this to your build.sbt
>  *   "org.twitter4j" % "twitter4j-stream" % "3.0.3",
>
>  */
> object SimpleStreamer extends App {
>
>
>   def simpleStatusListener = new StatusListener() {
>     def onStatus(status: Status) {
>       println(status.getUserMentionEntities.length)
>     }
>
>     def onDeletionNotice(statusDeletionNotice: StatusDeletionNotice) {}
>
>     def onTrackLimitationNotice(numberOfLimitedStatuses: Int) {}
>
>     def onException(ex: Exception) {
>       ex.printStackTrace
>     }
>
>     def onScrubGeo(arg0: Long, arg1: Long) {}
>
>     def onStallWarning(warning: StallWarning) {}
>   }
>
>   val keywords = List("dog", "cat")
>   val twitterStream = new TwitterStreamFactory(Util.config).getInstance
>   twitterStream.addListener(simpleStatusListener)
>   twitterStream.filter(new FilterQuery().track(keywords.toArray))
>
> }
>
>
>
> On Fri, Jul 11, 2014 at 7:19 PM, SK <skrishna...@gmail.com> wrote:
>
>> I dont have a proxy server.
>>
>> thanks.
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-spark-user-list.1001560.n3.nabble.com/Streaming-training-Spark-Summit-2014-tp9465p9481.html
>> Sent from the Apache Spark User List mailing list archive at Nabble.com.
>>
>
>

Reply via email to