cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "gabriele renzi (JIRA)" <j...@apache.org>
Subject [jira] Created: (CASSANDRA-594) Add "count" and "del" commands to CLI
Date Wed, 02 Dec 2009 13:12:21 GMT
Add "count" and "del" commands to CLI
-------------------------------------

                 Key: CASSANDRA-594
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-594
             Project: Cassandra
          Issue Type: Improvement
          Components: Tools
    Affects Versions: 0.5
         Environment: all
            Reporter: gabriele renzi
             Fix For: 0.5


currently cassandra-cli does not 
* allow removal of columns
* allow visualization of column count for a row (useful for large sets)

The attached patch fixes this issue by adding three more commands, del <key>, del <key><col>,
count <key>. 

No new tests were addded as I could not find any for the CLI, if I have time I'll maybe add
some but this is not likely to happen soon. 

As an aside, IMVHO the cassandra cli would be better as a small lib loaded within jirb/jython,
parsing would come for free, flexibility would be much larger and it could be autogenerated
from the thrift api.  

{{{
Connected to localhost/9160
cassandra> get Influences.Influencer['k']
  (column=kewl2, value=10; timestamp=1259756945822)
  (column=kewl, value=10; timestamp=1259753635959)
Returned 2 rows.
cassandra> del Influences.Influencer['k']          
done removal
cassandra> get Influences.Influencer['k']
Returned 0 rows.
cassandra> set Influences.Influencer['k']['kewl2'] = '10'
Value inserted.
cassandra> count Influences.Influencer['k']              
1 columns
cassandra> del Influences.Influencer['k']['kewl2']       
done removal
cassandra> count Influences.Influencer['k']       
1 columns
cassandra> get Influences.Influencer['k']         
Returned 0 rows.
cassandra> count Influences.Influencer['k']
1 columns
cassandra> del Influences.Influencer['k']         
done removal
cassandra> count Influences.Influencer['k']
0 columns
cassandra> get Influences.Influencer['k']  
Returned 0 rows.
}}}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message