title: Spark, Scala, Streaming Twitter
body: <p>I wrote a scala script in Ubuntu  home path as abc.scala and hardcoded all oauth values from twitter app:</p>
  
  <pre><code>import org.apache.spark.streaming.{Seconds, StreamingContext}
  import org.apache.spark.SparkContext._
  import org.apache.spark.streaming.twitter._
  import org.apache.spark.SparkConf
  
  System.setProperty("twitter4j.oauth.consumerKey", consumerKey)
  System.setProperty("twitter4j.oauth.consumerSecret", consumerSecret)
  System.setProperty("twitter4j.oauth.accessToken", accessToken)
  System.setProperty("twitter4j.oauth.accessTokenSecret", accessTokenSecret)
  
  val filters="Raj"
  val sparkConf = new SparkConf().setAppName("TwitterPopularTags").setMaster("local[2]")
  val ssc = new StreamingContext(sparkConf, Seconds(2))
  val stream = TwitterUtils.createStream(ssc, None, filters)
  </code></pre>
  
  <p>I execute is as </p>
  
  <pre><code>$Spark_bin-2.7&gt; cat abc.scala | ./spark-shell
  </code></pre>
  
  <p>It runs till StreamingContext. But when it reaches TwitterUtils, It gives and error reading thus:</p>
  
  <blockquote>
    <p>Error: not found: TwitterUtils</p>
  </blockquote>
  
  <p>I downloaded latest Spark 2.0.1. Can you point out the settings or documents step by step?</p>