don't know what you were trying to express.
it's better if you can give the sample dataset and the purpose you want
to achieve, then we may give the right solution.
Thanks
Irene Markelic wrote:
I have and rdd that I want to group according to some key, but it just
doesn't work. I am a Scala b
Hi everybody,
I have and rdd that I want to group according to some key, but it just
doesn't work. I am a Scala beginner. So I have the following RDD:
langs: List[String]
rdd: RDD[WikipediaArticle])
val meinVal = rdd.flatMap(article=>langs.map(lang=>{if
(article.mentionsLanguage(lang){ Tup
Great, thanks!
--
View this message in context:
http://apache-spark-user-list.1001560.n3.nabble.com/groupBy-question-tp7357p7360.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.
also tried: res.map(group => (group._2.size, group._2[1].max)), but
> got
> an error for that as well.
>
> What is the right way to get the max of the timestamp field (the first
> field
> in the ArrayBuffer) for each group?
>
>
> thanks.
>
>
>
> --
> View this message in context:
> http://apache-spark-user-list.1001560.n3.nabble.com/groupBy-question-tp7357.html
> Sent from the Apache Spark User List mailing list archive at Nabble.com.
>
, group._2._1.max))
But I got an error : value _1 is not a member of Iterable[(Long, String,
String)]
2) I also tried: res.map(group => (group._2.size, group._2[1].max)), but got
an error for that as well.
What is the right way to get the max of the timestamp field (the first field
in the