Last active
August 29, 2015 14:04
-
-
Save oeddyo/d4c57ea2865a177979ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Data: | |
user url | |
1 www.twitter | |
2 www.yahoo.com | |
1 www.google.com | |
1 www.twitter.com | |
Output: | |
1 www.twitter.com:2,www.google.com:1 | |
2 www.yahoo.com | |
doing something like | |
def countUrlForUser(??) = { | |
//some how concat the url count and user id here | |
} | |
dataPipe.groupBy(u: (Long, String) => (u._1, u._2)) | |
.mapValues(countUrlForUser??) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment