You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by goofy real <go...@gmail.com> on 2014/03/25 07:28:44 UTC
Spark Streaming ZeroMQ Java Example
Is there a ZeroMQWordCount Java sample code?
https://github.com/apache/incubator-spark/blob/master/examples/src/main/scala/org/apache/spark/streaming/examples/ZeroMQWordCount.scala
Re: Spark Streaming ZeroMQ Java Example
Posted by Tathagata Das <ta...@gmail.com>.
Unfortunately there isnt one right now. But it is probably too hard to
start with the JavaNetworkWordCount<https://github.com/apache/incubator-spark/blob/master/examples/src/main/java/org/apache/spark/streaming/examples/JavaNetworkWordCount.java>,
and use the ZeroMQUtils in the same way as the Scala ZeroMQWordCount
example. Basically you have to change this
line<https://github.com/apache/incubator-spark/blob/master/examples/src/main/java/org/apache/spark/streaming/examples/JavaNetworkWordCount.java#L65>
and
create a zeromq stream rather than a socketStream. Refer to
ZeroMQUtils<http://spark.apache.org/docs/latest/api/external/zeromq/index.html#org.apache.spark.streaming.zeromq.ZeroMQUtils$>.createStream
docs for more details.
Would be great if you can contribute it back ;)
TD
On Mon, Mar 24, 2014 at 11:28 PM, goofy real <go...@gmail.com>wrote:
> Is there a ZeroMQWordCount Java sample code?
>
>
> https://github.com/apache/incubator-spark/blob/master/examples/src/main/scala/org/apache/spark/streaming/examples/ZeroMQWordCount.scala
>