Support Questions
Find answers, ask questions, and share your expertise

How to enable TwitterUtils Spark Streaming on CDH 5.2

How to enable TwitterUtils Spark Streaming on CDH 5.2

Rising Star

Hello,

 

I successfully installed the CDH 5.2 cluster. I can also start the spark-shell on my machines.

 

I can also import the streaming context in the spark-shell

 

scala> import org.apache.spark.streaming._
import org.apache.spark.streaming._

scala> import org.apache.spark.streaming.StreamingContext._
import org.apache.spark.streaming.StreamingContext._

 

but when I try to do a 

 

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

 

I get error

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

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

 

How can I write a twitter streaming application inside the spark-shell?