Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

group dataframe on 5 minute interval

group dataframe on 5 minute interval

Explorer

HI guys

timestamp            name  count(b.name)-------------------  ----  -------------2010-11-1610:32:22  John  22010-11-1610:35:12  John  72010-11-1610:36:34  John  12010-11-1610:37:45  John  22010-11-1610:48:26  John  82010-11-1610:55:00  John  92010-11-1610:58:08  John  2
this a current dataframe i have , what i want to do is to get a new dataframe having them grouped by 5 minute based on timestamp to get someting like this 
timestamp            name  count(b.name)
-------------------  ----  -------------
2010-11-16 10:30:00  John  2
2010-11-16 10:35:00  John  10
2010-11-16 10:40:00  John  0
2010-11-16 10:45:00  John  8
2010-11-16 10:50:00  John  0
2010-11-16 10:55:00  John  11 
using spark and scala ,
Any idea thanks 
Don't have an account?
Coming from Hortonworks? Activate your account here