Problem running Twitter streaming example

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem running Twitter streaming example

Chad Roberts
When attempting to run the Twitter streaming example from https://zeppelin.incubator.apache.org/docs/tutorial/tutorial.html I am seeing the following error.  Can anyone help me figure it out?

import org.apache.spark.streaming._ <console>:30: error: object twitter is not a member of package org.apache.spark.streaming import org.apache.spark.streaming.twitter._

I am using spark 1.3.1 and the tip of zeppelin master (as of yesterday) in case that makes a difference.

Thanks,
Chad
Reply | Threaded
Open this post in threaded view
|

Re: Problem running Twitter streaming example

moon
Administrator
Hi Chad,


%dep
z.reset
z.load("org.apache.spark:spark-streaming-twitter_2.10:1.3.1")

%spark
import org.apache.spark.streaming._
import org.apache.spark.streaming.twitter._
....


Hope this helps.

Thanks,
moon


On Thu, Sep 10, 2015 at 12:19 AM Chad Roberts <[hidden email]> wrote:
When attempting to run the Twitter streaming example from https://zeppelin.incubator.apache.org/docs/tutorial/tutorial.html I am seeing the following error.  Can anyone help me figure it out?

import org.apache.spark.streaming._ <console>:30: error: object twitter is not a member of package org.apache.spark.streaming import org.apache.spark.streaming.twitter._

I am using spark 1.3.1 and the tip of zeppelin master (as of yesterday) in case that makes a difference.

Thanks,
Chad
Reply | Threaded
Open this post in threaded view
|

Re: Problem running Twitter streaming example

Chad Roberts
Thanks,

I did indeed find that %dep fixed my problem.  Great feature.

Just in case anyone else encounters my situation, here is my full %dep paragraph that I used to make the example work.  (I switched to use Spark 1.4.1 after I posted here, hence the 1.4.1 version on my spark-streaming-twitter).

%dep
z.load("org.apache.spark:spark-streaming-twitter_2.10:1.4.1")
z.load("org.twitter4j:twitter4j-core:3.0.3")
z.load("org.twitter4j:twitter4j-media-support:3.0.3")
z.load("org.twitter4j:twitter4j-async:3.0.3")
z.load("org.twitter4j:twitter4j-examples:3.0.3")
z.load("org.twitter4j:twitter4j-stream:3.0.3")

On Wed, Sep 16, 2015 at 1:06 AM, moon soo Lee <[hidden email]> wrote:
Hi Chad,


%dep
z.reset
z.load("org.apache.spark:spark-streaming-twitter_2.10:1.3.1")

%spark
import org.apache.spark.streaming._
import org.apache.spark.streaming.twitter._
....


Hope this helps.

Thanks,
moon


On Thu, Sep 10, 2015 at 12:19 AM Chad Roberts <[hidden email]> wrote:
When attempting to run the Twitter streaming example from https://zeppelin.incubator.apache.org/docs/tutorial/tutorial.html I am seeing the following error.  Can anyone help me figure it out?

import org.apache.spark.streaming._ <console>:30: error: object twitter is not a member of package org.apache.spark.streaming import org.apache.spark.streaming.twitter._

I am using spark 1.3.1 and the tip of zeppelin master (as of yesterday) in case that makes a difference.

Thanks,
Chad