How to clean data from membase
Fri, 01/28/2011 - 14:09
Hi all,
I want to be able to remove unused data from Membase.
I put data once and my web app access it.
To give a litte bit of context is IP data, so if I do not see the ip in a month I want to remove it. I get the data from a different source,not the web.
I could use expiration but I do not want to get the data and then put the data with a new expiration time.
Is there a way to remove unused data from membase? I would like to remove all the ip that I have not seen in a month
Thanks,
Federico
Hey Federico, there are actually a few different ways of doing this.
I would personally recommend using expiration since the server would take care of all the work for you, but it seems like you don't want to go down that route.
You can also use our TAP interface (http://wiki.membase.org/display/membase/TAP+Protocol) to periodically stream out all the keys from Membase, parse that list to determine which ones are old and then send a delete for each key. There is an example script provided at /opt/membase/bin/ep_engine/management/tap.py that shows how this works for the default bucket.
You could also use key versioning to invalidate a whole group of keys, but I imagine that won't work here since some IP's will be very old and still be active correct?
Let me know if I can help further.
Perry
Forum support is great for free but sometimes you need a guaranteed response time and dedicated resources for your questions or issues.
Consider purchasing enterprise-level support from Couchbase: http://www.couchbase.com/products-and-services/overview
Call or email "sales -at- couchbase-dot- com" today!