spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hamza HACHANI <hamza.hach...@supcom.tn>
Subject problem with the method JavaDStream.foreachRDD() SparkStreaming
Date Fri, 03 Feb 2017 13:45:00 GMT
Hi,

I'm new to SparkStreaming.

I'm using the versions 2.10 for spark core and spark streaming

My issue is that when i try to use JavaPairDStream.foreachRDD :

 test.foreachRDD(new Function<JavaPairRDD<Integer, Long>,Void>() {
                public Void call(JavaPairRDD<Integer, Long> rdd) {
                  currentResponseCodeCounts = rdd.take(100);
                  return null;
                }});


it says this :

The method foreachRDD(Function <JavaPairRDD<String,Long>,Void>) in the type AbstractJavaDStreamLike<Tuple2<String,Long>,JavaPairDStream<String,Long>,JavaPairRDD<Function<JavaPairRDD<String,Long>>
is not applicable for the arguments (new Function<JavaPairRDD<Integer,Long>,Void>(){})


I can't figure out what i'm missing.

Thanx.


Mime
View raw message