Hi,
We looking for solution for same problem. We have a wide column family with counters and we want to delete old data like 1 months old. One of potential ideas was to implement hook in compaction code and drop column which we don't need. Is this a viable option?
Thanks,
Ilya
From: aaron morton Sent: Tuesday, February 12, 2013 9:01 AM To: Subject: Re: Deleting old items
So is it possible to delete all the data inserted in some CF between 2 dates or data older than 1 month ?
No.
You need to issue row level deletes. If you don't know the row key you'll need to do range scans to locate them.
If you are deleting parts of wide rows consider reducing the min_compaction_level_threshold on the CF to 2
Cheers
-----------------
Aaron Morton
Freelance Cassandra Developer
New
Ilya Grebnov's gravatar image asked Feb 13 2013 at 10:08 in Cassandra-User by Ilya Grebnov

2 Answers

That's what the TTL does.
Manually delete all the older data now, then start using TTL.
Cheers
----------------- Aaron Morton Freelance Cassandra Developer New Zealand
@aaronmorton http://www.thelastpickle.com
aaron morton's gravatar image answered Feb 17 2013 at 17:16 by aaron morton
According to https://issues.apache.org/jira/browse/CASSANDRA-2103 There is no support for time to live (TTL) on counter columns. Did I miss something?
Thanks,
Ilya
From: aaron morton Sent: Sunday, February 17, 2013 9:16 AM To: Subject: Re: Deleting old items during compaction (WAS: Deleting old items)
That's what the TTL does.
Manually delete all the older data now, then start using TTL.
Cheers
-----------------
Aaron Morton
Freelance Cassandra Developer
New
Ilya Grebnov's gravatar image answered Feb 17 2013 at 21:43 by Ilya Grebnov

Related Discussions

  • Deleting Old Items in Cassandra-user

  • Hi, I would like to know if there is a way to delete old/unused data easily ? I know about TTL but there are 2 limitations of TTL: - AFAIK, there is no TTL on counter columns - TTL need to be defined at write time, so it's too late for data already inserted. I also could use a standard "delete" but it seems inappropriate for such a massive. In some cases, I don't know the row key and would like...

  • CQL & Selecting Individual Items From A Map in Cassandra-user

  • I was wondering if anybody could explain the rationale behind disallowing selection of individual elements from a map in CQL and why an entire map must be retrieved at once when items are stored as distinct columns? Are there any plans to allow individual selection? Liam Stewart :: [email protected]..

  • Write Time Of CQL3 Set Items in Cassandra-user

  • Hi all, I am using C* 1.2.4 with CQL3 and am taking advantage of the new collection support. One usage case I have is that I want a set of text and I need to know the time when each item in the set was written. If I understand CQL3 correctly, the underlying data engine utilizes composites for sets and maps (where sets are just maps with no values). I was hoping that I could store my text...

  • Any Limits On Number Of Items In A Collection Column Type in Cassandra-user

  • Hi, I have a column daycount list. The column is storing a count. Every few secs a new count is appended. The total count for the day is the sum of all items in the list. My application logs indicate I wrote about 110000 items to the column for a particular row. Assume row key is day_timestamp. But when I do a read on the column I get back a list with only 43000 items. Checked with...

  • Data Model Question : Finding Out The N Most Recent Changes Items in Cassandra-user

  • I have an application that need to find out the n most recent modified files for a given user id. I started out few tables but still couldn't get what i want, I hope someone get point to some right direction... See my tables below. #1 won't work, because file_id's timeuuid contains creation time, not the modification time. #2 won't work, because i can't order by a non primary key column...

  • Store Individual Inventory Items In A Table, How To Assign Them Correctly in Cassandra-user

  • Say I have 100 products in inventory, instead of having a counter I want to create 100 rows per inventory item. When someone purchases a product, how can I correctly assign that customer a product from inventory without having any race conditions etc? Thanks....

  • DELETING Items in Mysql-general

  • ...

  • Problems Deleting Items in Mysql-general

  • Hi, This is probably an easy question for the MySQL pros out there. One of our customers has a web-based forum driven by MySQL. He has a pretty popular web site, and his database has grown to about 5MB. We used a command like this to get rid of alot of his messages: DELETE FROM whatever WHERE cls < 952000000; That took out alot of his messages, but when you look at his database...

  • SV: DELETING Items in Mysql-general

  • sub queries are not yet implemented in MySql, but will be in 4.0... Regards, Johan Nilsson...

  • Deleting Dictionary Items in Python

  • What's the best way to delete dictionary items? I have a dictionary with tuples as keys, and I would like to delete all for item in td.data.keys(): if item[attr] != value: del td.data[item] But will this work?...

  • Deleting Items In A List in Ibatis-user-java

  • I have an object with a list. I want to delete the items in the list and the object too. Is it better to let a foreign key do this in the database or have IBATIS do it? If IBATIS, should I run two deletes for the object and items, or does Ibatis have a better way? Thanks, Warren Bell Systems Administrator Clark's Nutritional Centers 4225 Market St. Riverside, CA 92501 951-321-1960 ext. 142 909-645...

  • Deleting Items From Tix Tree in Python

  • hi iam using Tix tree widget in my python script. how can i delete the entire tree. i tried the following self.msgTree = Tix.Tree(self.msgWin) self.msgTree.hlist.delete() but it thorws the following error self.msgTree.hlist.delete() File "/usr/local/lib/python2.2/lib-tk/Tix.py", line 320, in __getattr__ raise AttributeError, name AttributeError: delete can some one help me thanks ...

  • Dictionary That Discards Old Items in Python

  • Hi folks, I need a collection class that behaves like a dictionary but when it reaches 'n' items it discards the oldest item so that the length never goes above 'n'. (Its for caching search results) I have a vague memory of a module that does this, but I cant remember where I read about it. Can anyone enlighten me? Regards, Will McGugan http://www.willmcgugan.com "".join({'*':'@','^':'.'}....

  • Deleting Carts in Php-db

  • I am developing a shopping cart style e-commerce web site. I have a table called carts that holds users' cart items ... so one user may have several entries in this table: +----------------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +----------------+--------------+------+-----+---------+-------+ | cust_id | int...

  • Deleting File Contents in Php-general

  • Hi Everyone, I'm running a script that automatically reads lines from /var/mail/myaccount, parses the lines then insert specific items into a database.... this is in a loop What i want to do is then delete the contents of the file, but not the file itself...can you tell me the best way to do this? many thanks anna...

  • Deleting Array Elements in Php-general

  • Hi All I have two array one with a list of items in it. Then a second array with a list of items in it what I want to be able to do is compare array1 to array2 and if a match is found in both arrays delete that match from array1 and then so now? Any help would be good. so array1 = (1,2,3,4,5) array2 = (1,3,5) then print array1 and the output be 2,4 Thank you...

  • Deleting Items Within A For Loop - Mutable Indices in Python

  • Okay - here's a (probably) really easy question: I can't do the following, so what's the best way to handle this case of wanting to delete within a loop? x = [0,1,2,3,4,5,6,7,8] deletion_list = [2,7,8] for i in deletion_list: del x[i] This obviously doesn't work because the list keeps changing each time I delete something, so the indices are no longer valid after the first delete (so I get an...

  • Deleting Multiple Items From Database Using Checkboxes in Php-general

  • Hi people,. I have a guestbook admin page were i would like to delete one item or more items from the database if necessary. I have modified my normal guestbookpage so that it has checkboxes in front of every entry. This is my code: Now i can select multiple items. But i have tried to delete em, but it DELETE FROM gastenboek WHERE entryID=$dele . Can anyone help me. Thanks for your...

  • Solrcloud Data Directory Structure in Lucene-solr-user

  • I see the items under my solorcloud data directory of "replica node" as drwxr-xr-x 2 solr solr 42 Feb 22 18:19 index drwxr-xr-x 2 solr solr 12288 Feb 23 01:00 index.20130222181947835 -rw-r--r-- 1 solr solr 78 Feb 22 18:25 index.properties -rw-r--r-- 1 solr solr 209 Feb 22 18:25 replication.properties drwxr-xr-x 2 solr solr 99 Feb 23 01:00 tlog The index. directory is always there. But...

  • Deleting Cart Items On Session Expire in Php-general

  • hey all, I was wondering how one would suggest removing items from a cart system once the session lifetime has expired. I have it set to the default 0, which expires the session on browser close, what I want to be able to do is "delete * from Cart where session='$PHPSESSID'" when the user closes thier browser window is this even possible? maybe using register_shutdown_function or something? ...

  • Deleting Or Editing Specific Lines In Text File in Tasker

  • Hi, I'm working on a shopping list and so far I have been able to create a button/function that can add items to the list by appending a line to my shopping.txt. I have a scene that shows every line from the txt as a separate text element. I want to be able to tap each element and have Tasker delete the corresponding line in the txt file. I would also be ok with being able to change any...

  • [jira] [Updated] (HADOOP-8578) Provide A Mechanism For Cleaning Config Items From LocalDirAllocator Which Will Not Be Used Anymore in Hadoop-common-issues

  • [ https://issues.apache.org/jira/browse/HADOOP-8578?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Devaraj K updated HADOOP-8578: ------------------------------ Affects Version/s: 3.0.0 2.0.0-alpha > Provide a mechanism for cleaning config items from LocalDirAllocator which will not be used anymore > --------------------------------------------------------------------------------------------------- > > ...

  • [[email protected]] SSL & Nonsecure Items in Httpd-users

  • I'm currently wrestling with the set up of SSL on Apache (on Windows) and I have the server up and running and accepting https connections etc. When I first connect to the website from my browser (IE in this case) I get the warning regarding the certificate (I have set up a test certificate), which is fine. However every page I subsequently go to I get a "do you want to display nonsecure items" dialog...

  • ANN: Node-bplus - Wrapper For CoW B+ Tree C Library in Nodejs

  • Hey devs! I want to show you my weekend project: https://github.com/indutny/node-bplus It is a binding for a bplus ( https://github.com/indutny/bplus ) CoW database engine. And according to the old russian tradition - one benchmark better than a thousand of words: One-threaded read/write (in non-empty database): 100000 items in db write : 9865.357599 ops/sec read : 57383.402903 ops/sec Multi...

  • Old New Bug: BatchSize And Sort Not Working (v2.0.2) in Mongodb-user

  • I'm using mongodb-linux-x86_64-2.0.2. Setting batchSize and sorting does not work correctly. It seems that batchSize limits the number of results. Let me show you an example: 1) add first 10.000 items to a fresh DB 2) select using batchSize(100) and sort 3) iterate over the resultset => we only have 100 items 4) select using batchSize(100) without sort 5) iterate over the resultset => all ...