Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Even after adapting the code to new version of DSX on spark getting errors #6

Open
tjhgit opened this issue Mar 16, 2018 · 1 comment

Comments

@tjhgit
Copy link

tjhgit commented Mar 16, 2018

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:

@vaibhavisavani1910
Copy link

@tjhgit

I m having the same error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants