works now. I should have checked :)

On Tue, Mar 10, 2015 at 1:44 PM, Sean Owen <so...@cloudera.com> wrote:

> Ah, that's a typo in the example: use words.mapToPair
> I can make a little PR to fix that.
>
> On Tue, Mar 10, 2015 at 8:32 PM, Mohit Anchlia <mohitanch...@gmail.com>
> wrote:
> > I am getting following error. When I look at the sources it seems to be a
> > scala source, but not sure why it's complaining about it.
> >
> > The method map(Function<String,R>) in the type JavaDStream<String> is not
> > applicable for the arguments (new
> >
> > PairFunction<String,String,Integer>(){})
> >
> >
> > And my code has been taken from the spark examples site:
> >
> >
> > JavaPairDStream<String, Integer> pairs = words.map(
> >
> > new PairFunction<String, String, Integer>() {
> >
> > @Override public Tuple2<String, Integer> call(String s) throws Exception
> {
> >
> > return new Tuple2<String, Integer>(s, 1);
> >
> >
> > }
> >
> > });
> >
> >
>

Reply via email to