如何通过Apache Spark Streaming执行Twitter数据的流式传输?
之前我通过水槽获取了Twitter数据并存储在HDFS中,我在conf.txt中配置了twitter登录凭据。
但现在却陷入了通过Apache Spark Streaming获取Twitter数据的问题。
问题在于放置Twitter登录凭据.. 请帮帮我..
答案 0 :(得分:0)
为什么不使用sc.setLocalProperties()? 创建一个
val ssc = new StreamingContext("local[10]", "test", Duration(3000))
val sc = ssc.sparkContext
和
sc.setLocalProperties()