spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Owen <so...@cloudera.com>
Subject Re: Error Compiling
Date Sat, 31 Jan 2015 09:04:53 GMT
I assume you're trying to sum *by key* within each window. The _ + _
operation applies to integers, but here you're telling it to sum
(String,Int) pairs, which isn't defined. Use reduceByKeyAndWindow

On Sat, Jan 31, 2015 at 12:00 AM, Eduardo Costa Alfaia
<e.costaalfaia@unibs.it> wrote:
> Hi Guys,
>
> some idea how solve this error
>
> [error]
> /sata_disk/workspace/spark-1.1.1/examples/src/main/scala/org/apache/spark/examples/streaming/KafkaWordCount.scala:76:
> missing parameter type for expanded function ((x$6, x$7) => x$6.$plus(x$7))
> [error]     val wordCounts = words.map(x => (x, 1L)).reduceByWindow(_ + _, _
> - _, Minutes(1), Seconds(2), 2)
>
> Thanks
>
> Informativa sulla Privacy: http://www.unibs.it/node/8155

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org


Mime
View raw message