Reputation: 1
I followed this great tutorial, and everything worked great except for one thing.
step#11, in the table, all the emotions scores are 0! it seems that Tone Analyzer is not connected. I am sure that I put the correct (credintials)username & password.
After I searched a lot, I found that one month ago, IBM changed Tone Analyzer plan from experimental to Beta.
I don't know what should I change in the code, to make the Tone Analyzer with a new plan works for this example?
Upvotes: 0
Views: 127
Reputation: 206
I recently updated the tutorial to deal with API changes in Tone Analyzer which transitioned from experimental to Beta. Are you using the latest version of the tutorial?
There are multiple reasons that could explain why you are not getting any tweets: wrong twitter or Tone analyzer credentials. Please double check these according to the tutorial instructions. To better diagnose errors, I've also added a StreamingListener in the latest tutorial version that should give you more information. You should see messages as follow:
Twitter stream started
Tweets are collected real-time and analyzed
To stop the streaming and start interacting with the data use: StreamingTwitter.stopTwitterStreaming
Receiver Started: TwitterReceiver-0
Batch started with 139 records
Batch completed with 139 records
Batch started with 270 records
Stopping Twitter stream. Please wait this may take a while
Receiver Stopped: TwitterReceiver-0
Reason: : Stopped by driver
Batch completed with 270 records
Twitter stream stopped
You can now create a sqlContext and DataFrame with 38 Tweets created. Sample usage:
val (sqlContext, df) = com.ibm.cds.spark.samples.StreamingTwitter.createTwitterDataFrames(sc)
df.printSchema
sqlContext.sql("select author, text from tweets").show
Finally, if you are using the pre-built jar file I posted on Github, make sure that you are using Spark 1.6 and not a back level version.
Upvotes: 2