Open tjhgit opened 6 years ago
See my pull request.
%AddJar https://github.com/tjhgit/jarhub/raw/master/streaming-twitter-assembly-1.6.jar -f val demo = com.ibm.cds.spark.samples.StreamingTwitter // val config = demo.getConfig() //Watson Tone Analyzer service demo.setConfig("watson.tone.url","https://gateway.watsonplatform.net/tone-analyzer/api") demo.setConfig("watson.api.version","2017-09-21") demo.setConfig("watson.tone.password","xxx") demo.setConfig("watson.tone.username","xxxx") demo.setConfig("twitter4j.oauth.consumerKey","xxxx") demo.setConfig("twitter4j.oauth.consumerSecret","xxxx") demo.setConfig("twitter4j.oauth.accessToken","xxxx") demo.setConfig("twitter4j.oauth.accessTokenSecret","xxxx") import org.apache.spark.streaming._ demo.startTwitterStreaming(sc, Seconds(30))
Leads to the following error:
Name: Compile Error Message: :42: error: type mismatch; found : org.apache.spark.org.apache.spark.org.apache.spark.org.apache.spark.org.apache.spark.SparkContext required: org.apache.spark.org.apache.spark.org.apache.spark.org.apache.spark.org.apache.spark.SparkContext demo.startTwitterStreaming(sc, Seconds(30)) ^ StackTrace:
@tjhgit
I m having the same error
See my pull request.
Leads to the following error: