spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xingchi Wang <regrec...@gmail.com>
Subject Re: Struggling time by data
Date Fri, 25 Dec 2015 10:23:05 GMT
map{case(x, y) => s = x.split("_"), (s(0), (s(1),
y)))}.groupByKey().filter{case (_, (a, b)) => abs(a._1, a._1) < 30min}

does it work for you ?

2015-12-25 16:53 GMT+08:00 Yasemin Kaya <godot85@gmail.com>:

> hi,
>
> I have struggled this data couple of days, i cant find solution. Could you
> help me?
>
> *DATA:*
> *(userid1_time, url) *
> *(userid1_time2, url2)*
>
>
> I want to get url which are in 30 min.
>
> *RESULT:*
> *If time2-time1<30 min*
> *(user1, [url1, url2] )*
>
> Best,
> yasemin
> --
> hiç ender hiç
>

Mime
View raw message