Skip to content

Instantly share code, notes, and snippets.

@lyondhill
Created June 27, 2012 19:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lyondhill/3006344 to your computer and use it in GitHub Desktop.
Save lyondhill/3006344 to your computer and use it in GitHub Desktop.
I need help figureing out how to do this
# I have data that looks like this
{
timestamp: 123466 # unix timestamp since epoc
component: 'id1' # some unique id
processes: 'id2' # another unique id
cpu: 30 # a cpu usage statistic for the component/process
mem: 79 # a memory usange stat
}
# what im trying to do is store them in one column family
# and then just grab all the ones that match the component and between 2 unix time stamps
client.get(????)
# I dont really know the best way to store this.. or retrieve it using the gem.
# in riak something like this
client.search('stats','component:id1 timestamp:[100000 TO 200000]')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment