Weitere ähnliche Inhalte Ähnlich wie Cassandra for all the Things (20) Mehr von Theo Hultberg (9) Kürzlich hochgeladen (20) Cassandra for all the Things16. visitor ID
visitor ID
timestamp timestamp timestamp
event event event
timestamp timestamp timestamp
event event event
visitor ID
visitor ID
timestamp timestamp timestamp
event event event
timestamp timestamp timestamp
event event event
visitor ID
timestamp timestamp timestamp
event event event
➔
20. SELECT
category,
author,
device_type,
COUNT(*) AS pageviews,
AVG(duration) AS duration
FROM pageviews
GROUP BY 1, 2, 3
@iconara
21. SELECT
category,
author,
device_type,
COUNT(*) AS pageviews,
AVG(duration) AS duration
FROM pageviews
GROUP BY 1, 2, 3
@iconara
22. SELECT
category,
author,
device_type,
COUNT(*) AS pageviews,
AVG(duration) AS duration
FROM pageviews
GROUP BY 1, 2, 3
@iconara
23. date + cube
slice + time slice + time slice + time
metrics metrics metrics
24. “sports”, “Sue”, “tablet”
date + cube
slice + time slice + time slice + time
metrics metrics metrics
category, author, device type
25. date + cube
slice + time slice + time slice + time
metrics metrics metrics
{pageviews: 234, duration: 2451.45}
26. COUNTERS
at 2M increments per second they’re not cost-effective ×
@iconara
31. date +
cube +
shard
slice + time slice + time slice + time
metrics metrics metrics
H(slice) mod 12
33. cube +
slice + metric
time time time
value value value
cube
slice slice slice
35. cube + slice +
epoch + metric
time + version time + version time + version
value value value
cube + epoch
slice slice slice
time/1000
38. category +
device type
culture +
computer
culture +
tablet
news +
computer
news +
tablet
news +
mobile
sports +
computer
sports +
tablet
sports +
mobile
39. supports wildcard on device type
category +
device type
culture +
computer
culture +
tablet
news +
computer
news +
tablet
news +
mobile
sports +
computer
sports +
tablet
sports +
mobile
device type +
category
computer +
culture
computer +
news
computer +
sports
mobile +
news
mobile +
sports
tablet +
culture
tablet +
news
tablet +
sports
supports wildcard on category
41. session ID
timestamp timestamp timestamp
data data data
shard
session ID session ID session ID
H(session ID) mod 360
43. shard 9
NFNJ0U NFNJ13 NFNJ0Y NFNJ1L NFNJ16 NFNJ0U NFNJ1C NFNJ20 NFNJ0U NFNJ2L NFNJ2S NFNJ2D NFNJ2U NFNJ1X NFNJ4C NFNJ1O NFNJ1A NFNJ29 × × × × × × × × × × × × × × × ×
45. session ID
timestamp timestamp timestamp
data data data
shard + slot
session ID session ID session ID
46. session ID
timestamp timestamp timestamp
data data data
shard + slot
session ID session ID session ID
day-of-year mod 30
47. shard 9
slot 1 × × ×
shard 9
slot 3
NFNJ6Z NFNJ73 NFNJ7B NFNJ72 NFNJ7N NFNJ74 NFNJ6Z NFNJ8C NFNJ7N NFNJ88 NFNJ83 NFNJ94 NFNJ8Z NFNJ7P NFNJA3 × × × × × ×
shard 9
slot 2
NFNJ58 NFNJ5H NFNJ5C NFNJ5E NFNJ68 NFNJ6H NFNJ68 NFNJ5M NFNJ64 NFNJ6H NFNJ6C NFNJ5U NFNJ5K NFNJ84 NFNJ7Y NFNJ62 NFNJ70 NFNJ74 NFNJ6Q × × × × × × × × × × × × × × × ×