cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CASSANDRA-1088) Enable cassandra-cli to list rows, and page through rows in a column family
Date Fri, 01 Oct 2010 19:14:35 GMT

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

Jonathan Ellis commented on CASSANDRA-1088:
-------------------------------------------

Thanks for the updated patch!

I'm getting assertion failures on sets with it applied:

{code}
[default@unknown] create keyspace Keyspace1
a2c793f7-cd8f-11df-8e11-e700f669bcfc
[default@unknown] use Keyspace1
Authenticated to keyspace: Keyspace1
[default@Keyspace1] create column family CF2 with comparator=LongType
abb3d198-cd8f-11df-8e11-e700f669bcfc
[default@Keyspace1] set CF2[key1][12345] = 'value'    
Exception in thread "main" java.lang.AssertionError
	at org.apache.cassandra.cli.CliCompiler.getKey(CliCompiler.java:98)
	at org.apache.cassandra.cli.CliClient.executeSet(CliClient.java:636)
	at org.apache.cassandra.cli.CliClient.executeCLIStmt(CliClient.java:95)
	at org.apache.cassandra.cli.CliMain.processCLIStmt(CliMain.java:230)
	at org.apache.cassandra.cli.CliMain.main(CliMain.java:302)
{code}

> 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.1
>
>         Attachments: cassandra-cli-list.patch, 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