cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank Du (JIRA)" <j...@apache.org>
Subject [jira] Updated: (CASSANDRA-1088) Enable cassandra-cli to list rows, and page through rows in a column family
Date Wed, 02 Jun 2010 21:27:40 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-1088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Frank Du updated CASSANDRA-1088:
--------------------------------

    Attachment: path-2010-0602.txt

Hi Eric,

The assertion error may be caused by dated antlr lexer/parser. Please run ant first to regenerate
them. 

Here I have attached the updated patch, according to your feedback. The changes are:

1. Update {{olumn.timestamp}} to {{olumn.clock.timestamp}}
2. Add usage docs to the help synopsis.
3. Updated getFormatTypeForColumn() method, since the UTF8Type class constructor isn't public
any more. It cannot be instantiated by reflection.

Please check it. If anything supplemental is needed, please let me know. 

Thanks,
Frank 

> 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, path-2010-0602.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.


Mime
View raw message