首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Bluemix Spark Service -它支持spark streaming吗?

Bluemix Spark Service -它支持spark streaming吗?
EN

Stack Overflow用户
提问于 2015-08-13 10:42:20
回答 1查看 166关注 0票数 2

使用spark ipython样板,可以创建spark流应用程序吗?因为spark上下文是用notebook预先配置的,所以这似乎是不可能的。我正在尝试一个简单的应用程序:

代码语言:javascript
运行
复制
import org.apache.spark._
import org.apache.spark.streaming._
import org.apache.spark.streaming.StreamingContext._

val ssc = new StreamingContext(sc, Seconds(1))

val lines = ssc.socketTextStream("129.41.138.175", 9999)

// Split each line into words
val words = lines.flatMap(_.split(" "))

// Count each word in each batch
val pairs = words.map(word => (word, 1))
val wordCounts = pairs.reduceByKey(_ + _)

// Print the first ten elements of each RDD generated in this DStream 
wordCounts.print()

ssc.start()             // Start the computation
ssc.awaitTermination()  // Wait for the computation to terminate

Error:
Name: akka.actor.InvalidActorNameException
Message: actor name [JobScheduler] is not unique!
StackTrace: akka.actor.dungeon.ChildrenContainer$NormalChildrenContainer.reserve(ChildrenContainer.scala:130)
akka.actor.dungeon.Children$class.reserveChild(Children.scala:77)
akka.actor.ActorCell.reserveChild(ActorCell.scala:369)
akka.actor.dungeon.Children$class.makeChild(Children.scala:202)
akka.actor.dungeon.Children$class.attachChild(Children.scala:42)
akka.actor.ActorCell.attachChild(ActorCell.scala:369)
akka.actor.ActorSystemImpl.actorOf(ActorSystem.scala:552)
org.apache.spark.streaming.scheduler.JobScheduler.start(JobScheduler.scala:58)
...
EN

回答 1

Stack Overflow用户

发布于 2015-10-30 04:10:35

我们确实支持Spark streaming。它内置于我们在Bluemix上部署的Spark中。但这取决于Spark的版本和使用的语言。早期的Spark,如1.3.1,不支持python的流媒体。当前版本为1.4.1。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/31978638

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档