Created
April 19, 2015 15:00
-
-
Save nivdul/6424b9b21745d8718036 to your computer and use it in GitHub Desktop.
create bucket of sorted data by ascending timestamp by (user, activity)
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
// create bucket of sorted data by ascending timestamp by (user, activity) | |
JavaRDD<Long> times = cassandraRowsRDD.select("timestamp") | |
.where("user_id=? AND activity=?", i, activity) | |
.withAscOrder() | |
.map(CassandraRow::toMap) | |
.map(entry -> (long) entry.get("timestamp")) | |
.cache(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment