You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Ellis (JIRA)" <ji...@apache.org> on 2010/10/13 15:38:33 UTC

[jira] Created: (CASSANDRA-1615) cli index scan support

cli index scan support
----------------------

                 Key: CASSANDRA-1615
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1615
             Project: Cassandra
          Issue Type: New Feature
          Components: Tools
    Affects Versions: 0.7 beta 1
            Reporter: Jonathan Ellis
            Assignee: Pavel Yaskevich
             Fix For: 0.7.0


cli needs to support get_indexed_slices.

one syntax might be

{code}
GET cf WHERE column1=value1 AND column2>value2
{code}

(OR is not supported by get_indexed_slices, only AND)

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


[jira] Updated: (CASSANDRA-1615) cli index scan support

Posted by "Pavel Yaskevich (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pavel Yaskevich updated CASSANDRA-1615:
---------------------------------------

    Attachment: CASSANDRA-1615-v3.patch

rebased. latest commit was 1fd6af347ab1c8d989b903f3a8a18e3a33c616fe 

> cli index scan support
> ----------------------
>
>                 Key: CASSANDRA-1615
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1615
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Tools
>    Affects Versions: 0.7 beta 1
>            Reporter: Jonathan Ellis
>            Assignee: Pavel Yaskevich
>             Fix For: 0.7.0
>
>         Attachments: CASSANDRA-1615-v2.patch, CASSANDRA-1615-v3.patch, CASSANDRA-1615.patch
>
>
> cli needs to support get_indexed_slices.
> one syntax might be
> {code}
> GET cf WHERE column1=value1 AND column2>value2
> {code}
> (OR is not supported by get_indexed_slices, only AND)

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


[jira] Updated: (CASSANDRA-1615) cli index scan support

Posted by "Pavel Yaskevich (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pavel Yaskevich updated CASSANDRA-1615:
---------------------------------------

    Attachment: CASSANDRA-1615-with-fixed-tests.patch

Sorry about that, I committed broken test...

> cli index scan support
> ----------------------
>
>                 Key: CASSANDRA-1615
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1615
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Tools
>    Affects Versions: 0.7 beta 1
>            Reporter: Jonathan Ellis
>            Assignee: Pavel Yaskevich
>             Fix For: 0.7.0
>
>         Attachments: CASSANDRA-1615-v2.patch, CASSANDRA-1615-v3.patch, CASSANDRA-1615-with-fixed-tests.patch, CASSANDRA-1615.patch
>
>
> cli needs to support get_indexed_slices.
> one syntax might be
> {code}
> GET cf WHERE column1=value1 AND column2>value2
> {code}
> (OR is not supported by get_indexed_slices, only AND)

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


[jira] Issue Comment Edited: (CASSANDRA-1615) cli index scan support

Posted by "Pavel Yaskevich (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12922696#action_12922696 ] 

Pavel Yaskevich edited comment on CASSANDRA-1615 at 10/19/10 4:06 PM:
----------------------------------------------------------------------

I have few questions according to this task:

1). What is start_key in IndexClause and how should I set it here? (i read http://wiki.apache.org/cassandra/API and did not get it...)
2). I need to pass SlicePredicate into get_indexed_slices call, so the question is how to determine which columns should I include in it? should I include only columns from conditions? 

I see that in executeList() was used the following technique for SlicePredicate:

{code}
 // read all columns and superColumns
 SlicePredicate predicate = new SlicePredicate();
 SliceRange sliceRange = new SliceRange();
 sliceRange.setStart(new byte[0]).setFinish(new byte[0]);
 predicate.setSlice_range(sliceRange);
{code}

Just want to make sure I understand everything correctly here... Thanks!





      was (Author: xedin):
    I have few questions according to this task:

1). What is start_key in IndexClause and how should I set it here? (i read http://wiki.apache.org/cassandra/API and did not get it...)
2). I need to pass SlicePredicate into get_indexed_slices call, so the question is how to determine which columns should I include in it? should I include only columns from conditions? 

I see that in executeList() was used the following technique for SlicePredicate:

{code}
        // read all columns and superColumns
        SlicePredicate predicate = new SlicePredicate();
        SliceRange sliceRange = new SliceRange();
        sliceRange.setStart(new byte[0]).setFinish(new byte[0]);
        predicate.setSlice_range(sliceRange);
{code}

Just want to make sure I understand everything correctly here... Thanks!




  
> cli index scan support
> ----------------------
>
>                 Key: CASSANDRA-1615
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1615
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Tools
>    Affects Versions: 0.7 beta 1
>            Reporter: Jonathan Ellis
>            Assignee: Pavel Yaskevich
>             Fix For: 0.7.0
>
>
> cli needs to support get_indexed_slices.
> one syntax might be
> {code}
> GET cf WHERE column1=value1 AND column2>value2
> {code}
> (OR is not supported by get_indexed_slices, only AND)

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


[jira] Updated: (CASSANDRA-1615) cli index scan support

Posted by "Pavel Yaskevich (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pavel Yaskevich updated CASSANDRA-1615:
---------------------------------------

    Attachment: CASSANDRA-1615-v2.patch

LIMIT support.

> cli index scan support
> ----------------------
>
>                 Key: CASSANDRA-1615
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1615
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Tools
>    Affects Versions: 0.7 beta 1
>            Reporter: Jonathan Ellis
>            Assignee: Pavel Yaskevich
>             Fix For: 0.7.0
>
>         Attachments: CASSANDRA-1615-v2.patch, CASSANDRA-1615.patch
>
>
> cli needs to support get_indexed_slices.
> one syntax might be
> {code}
> GET cf WHERE column1=value1 AND column2>value2
> {code}
> (OR is not supported by get_indexed_slices, only AND)

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


[jira] Commented: (CASSANDRA-1615) cli index scan support

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12923063#action_12923063 ] 

Jonathan Ellis commented on CASSANDRA-1615:
-------------------------------------------

{code}
    [junit] Testcase: testCli(org.apache.cassandra.cli.CliTest):	FAILED
    [junit] null
    [junit] junit.framework.AssertionFailedError: null
    [junit] 	at org.apache.cassandra.cli.CliTest.testCli(CliTest.java:98)
    [junit] 
    [junit] 
    [junit] Test org.apache.cassandra.cli.CliTest FAILED
{code}

> cli index scan support
> ----------------------
>
>                 Key: CASSANDRA-1615
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1615
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Tools
>    Affects Versions: 0.7 beta 1
>            Reporter: Jonathan Ellis
>            Assignee: Pavel Yaskevich
>             Fix For: 0.7.0
>
>         Attachments: CASSANDRA-1615-v2.patch, CASSANDRA-1615-v3.patch, CASSANDRA-1615.patch
>
>
> cli needs to support get_indexed_slices.
> one syntax might be
> {code}
> GET cf WHERE column1=value1 AND column2>value2
> {code}
> (OR is not supported by get_indexed_slices, only AND)

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


[jira] Commented: (CASSANDRA-1615) cli index scan support

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12920561#action_12920561 ] 

Jonathan Ellis commented on CASSANDRA-1615:
-------------------------------------------

probably should do CASSANDRA-1088 before this.

> cli index scan support
> ----------------------
>
>                 Key: CASSANDRA-1615
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1615
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Tools
>    Affects Versions: 0.7 beta 1
>            Reporter: Jonathan Ellis
>            Assignee: Pavel Yaskevich
>             Fix For: 0.7.0
>
>
> cli needs to support get_indexed_slices.
> one syntax might be
> {code}
> GET cf WHERE column1=value1 AND column2>value2
> {code}
> (OR is not supported by get_indexed_slices, only AND)

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


[jira] Commented: (CASSANDRA-1615) cli index scan support

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12922979#action_12922979 ] 

Jonathan Ellis commented on CASSANDRA-1615:
-------------------------------------------

bq. We should have LIMIT support like in the list command or equivalent, defaulting to something sane like 100.

> cli index scan support
> ----------------------
>
>                 Key: CASSANDRA-1615
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1615
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Tools
>    Affects Versions: 0.7 beta 1
>            Reporter: Jonathan Ellis
>            Assignee: Pavel Yaskevich
>             Fix For: 0.7.0
>
>         Attachments: CASSANDRA-1615.patch
>
>
> cli needs to support get_indexed_slices.
> one syntax might be
> {code}
> GET cf WHERE column1=value1 AND column2>value2
> {code}
> (OR is not supported by get_indexed_slices, only AND)

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


[jira] Commented: (CASSANDRA-1615) cli index scan support

Posted by "Pavel Yaskevich (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12922696#action_12922696 ] 

Pavel Yaskevich commented on CASSANDRA-1615:
--------------------------------------------

I have few questions according to this task:

1). What is start_key in IndexClause and how should I set it here? (i read http://wiki.apache.org/cassandra/API and did not get it...)
2). I need to pass SlicePredicate into get_indexed_slices call, so the question is how to determine which columns should I include in it? should I include only columns from conditions? 

I see that in executeList() was used the following technique for SlicePredicate:

{code}
        // read all columns and superColumns
        SlicePredicate predicate = new SlicePredicate();
        SliceRange sliceRange = new SliceRange();
        sliceRange.setStart(new byte[0]).setFinish(new byte[0]);
        predicate.setSlice_range(sliceRange);
{code}

Just want to make sure I understand everything correctly here... Thanks!





> cli index scan support
> ----------------------
>
>                 Key: CASSANDRA-1615
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1615
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Tools
>    Affects Versions: 0.7 beta 1
>            Reporter: Jonathan Ellis
>            Assignee: Pavel Yaskevich
>             Fix For: 0.7.0
>
>
> cli needs to support get_indexed_slices.
> one syntax might be
> {code}
> GET cf WHERE column1=value1 AND column2>value2
> {code}
> (OR is not supported by get_indexed_slices, only AND)

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


[jira] Commented: (CASSANDRA-1615) cli index scan support

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12922837#action_12922837 ] 

Jonathan Ellis commented on CASSANDRA-1615:
-------------------------------------------

1) say you want to get the first 100 users born in 1980.  then you want to get the next 100.  for the second call you would pass as start_key the last row key you got back from the first call.  generally the first call start_key will always be empty.

2) CLI does not have sophisticated SlicePredicate anywhere else so adding it here is not required.  Fetching the whole row is fine.

We should have LIMIT support like in the list command or equivalent, defaulting to something sane like 100.

> cli index scan support
> ----------------------
>
>                 Key: CASSANDRA-1615
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1615
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Tools
>    Affects Versions: 0.7 beta 1
>            Reporter: Jonathan Ellis
>            Assignee: Pavel Yaskevich
>             Fix For: 0.7.0
>
>
> cli needs to support get_indexed_slices.
> one syntax might be
> {code}
> GET cf WHERE column1=value1 AND column2>value2
> {code}
> (OR is not supported by get_indexed_slices, only AND)

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


[jira] Commented: (CASSANDRA-1615) cli index scan support

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12923030#action_12923030 ] 

Jonathan Ellis commented on CASSANDRA-1615:
-------------------------------------------

doesn't apply post-CASSANDRA-1619, can you rebase?

> cli index scan support
> ----------------------
>
>                 Key: CASSANDRA-1615
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1615
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Tools
>    Affects Versions: 0.7 beta 1
>            Reporter: Jonathan Ellis
>            Assignee: Pavel Yaskevich
>             Fix For: 0.7.0
>
>         Attachments: CASSANDRA-1615-v2.patch, CASSANDRA-1615.patch
>
>
> cli needs to support get_indexed_slices.
> one syntax might be
> {code}
> GET cf WHERE column1=value1 AND column2>value2
> {code}
> (OR is not supported by get_indexed_slices, only AND)

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


[jira] Commented: (CASSANDRA-1615) cli index scan support

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12923114#action_12923114 ] 

Jonathan Ellis commented on CASSANDRA-1615:
-------------------------------------------

committed

> cli index scan support
> ----------------------
>
>                 Key: CASSANDRA-1615
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1615
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Tools
>    Affects Versions: 0.7 beta 1
>            Reporter: Jonathan Ellis
>            Assignee: Pavel Yaskevich
>             Fix For: 0.7.0
>
>         Attachments: CASSANDRA-1615-v2.patch, CASSANDRA-1615-v3.patch, CASSANDRA-1615-with-fixed-tests.patch, CASSANDRA-1615.patch
>
>
> cli needs to support get_indexed_slices.
> one syntax might be
> {code}
> GET cf WHERE column1=value1 AND column2>value2
> {code}
> (OR is not supported by get_indexed_slices, only AND)

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


[jira] Updated: (CASSANDRA-1615) cli index scan support

Posted by "Pavel Yaskevich (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pavel Yaskevich updated CASSANDRA-1615:
---------------------------------------

    Attachment: CASSANDRA-1615.patch

> cli index scan support
> ----------------------
>
>                 Key: CASSANDRA-1615
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1615
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Tools
>    Affects Versions: 0.7 beta 1
>            Reporter: Jonathan Ellis
>            Assignee: Pavel Yaskevich
>             Fix For: 0.7.0
>
>         Attachments: CASSANDRA-1615.patch
>
>
> cli needs to support get_indexed_slices.
> one syntax might be
> {code}
> GET cf WHERE column1=value1 AND column2>value2
> {code}
> (OR is not supported by get_indexed_slices, only AND)

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