But if a use messages.count().print this show a single number :/

2015-04-24 20:22 GMT+02:00 Sean Owen <so...@cloudera.com>:

> It's not a Long. it's an infinite stream of Longs.
>
> On Fri, Apr 24, 2015 at 2:20 PM, Sergio Jiménez Barrio
> <drarse.a...@gmail.com> wrote:
> > It isn't the sum. This is de code:
> >
> > val messages = KafkaUtils.createDirectStream[String, String,
> StringDecoder,
> > StringDecoder](
> >   ssc, kafkaParams, topicsSet)
> >
> > messages.count() <--- This is a DStream with a element type Long, I need
> > this Long.
> >
> > Thanks!
> >
> > 2015-04-24 20:15 GMT+02:00 Sean Owen <so...@cloudera.com>:
> >>
> >> The sum? you just need to use an accumulator to sum the counts or
> >> something.
> >>
> >> On Fri, Apr 24, 2015 at 2:14 PM, Sergio Jiménez Barrio
> >> <drarse.a...@gmail.com> wrote:
> >> >
> >> > Sorry for my explanation, my English is bad. I just need obtain the
> Long
> >> > containing of the DStream created by messages.count(). Thanks for all.
> >> >
> >
> >
>

Reply via email to