[ 
https://issues.apache.org/jira/browse/CASSANDRA-1088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12869669#action_12869669
 ] 

Frank Du commented on CASSANDRA-1088:
-------------------------------------

Hi Eric,

An important update: The patch works well, if we quit cassandra-cli by 
exit/quit commands. Otherwise, it will cause issue Cassandra-1073. 

Could you please try it again with a clean keyspace? Please insert some rows, 
try the {{list}} command, and remember to quit by {{exit}} command. Restart 
cassandra, and {{list}} works fine!.

If you encountered any issue running it, please let me know. Thank you so much!

Best Regards,
Frank

My Steps of Testing It:
===================
1. Run svn update, ant.
2. Start cassandra.
3. Start cassandra-cli, created a keyspace programmatically. 
4. Insert data with {{set}}, view it with {{get}} and {{list}}. Everything 
works.
5. Type {{exit}} to exit. Import step, otherwise SStable is corrupted.
6. Restart cassandra and cli.
7. Test the commands {{set}}, {{get}}, {{list}}. Everything works!

> Enable cassandra-cli to list rows, and page through rows in a column family
> ---------------------------------------------------------------------------
>
>                 Key: CASSANDRA-1088
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1088
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Tools
>            Reporter: Frank Du
>             Fix For: 0.7
>
>         Attachments: patch.txt
>
>
> I have been looking for showing rows and paging through rows. Finally I write 
> this extension to cassandra-cli tool. 
> Let's assume that we have the following data in column family named 'CF1':
> =========================
> Row 1:
> key: fdu1, name: 'Frank Du', city: 'NYC'
> Row 2:
> key: fdu2, name: 'Jonathan Ellis'
> Row 3:
> key: fdu3, name: 'Eric Evans'
> Syntax:
> =========================
> LIST keyRangeExpression limitClause?
> keyRangeExpression:
>         columnFamilyName[ startKey : endKey ]  ( [ 'superCoumnName' ] )? 
> limitClause: 
>         LIMIT count (OFFSET offset)? 
>         \| LIMIT offset, count
> The limit clause is the same with MySql.
> Examples:
> =========================
> // list all the 3 rows in CF1
> list CF1[ '' : '' ]    
> // list all rows, offset from index 1. So it will show 2 rows
> list CF1[ '' : '' ] limit 1, 10    
>  // show the rows 'fdu2' and 'fdu3'
> list CF1[ 'fdu2' : '' ] limit 10 

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

Reply via email to