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