You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Jonas Bonér <jb...@gmail.com> on 2009/08/08 15:33:43 UTC

new thrift API

Hey guys.

Is the new API stabilizing?

How is the new range functions suppose to work?
    public List<Column> get_slice_by_names(String keyspace, String
key, ColumnParent column_parent, List<byte[]> column_names, int
consistency_level) throws InvalidRequestException, NotFoundException,
TException;

    public List<Column> get_slice(String keyspace, String key,
ColumnParent column_parent, byte[] start, byte[] finish, boolean
is_ascending, int count, int consistency_level) throws
InvalidRequestException, NotFoundException, TException;

These both have a start, finish and count. I was expecting start and
offset or only start, finish.

Is the new API documented yet?

Thanks.

-- 
Jonas Bonér

twitter: @jboner
blog:    http://jonasboner.com
work:   http://crisp.se
work:   http://scalablesolutions.se
code:   http://github.com/jboner

Re: new thrift API

Posted by Jonas Bonér <jo...@jonasboner.com>.
New API is much better.
Good job.

2009/8/8 Jonas Bonér <jo...@jonasboner.com>:
> Got it. Thanks a lot for amazing support on a Sat. :-)
>
> 2009/8/8 Jonathan Ellis <jb...@gmail.com>:
>> Count is always the max number of results to return.
>>
>> So it means, starting with `start`, or the first one if start is
>> empty, go until you hit `finish` or `count`, whichever comes first.
>> Empty is not a legal column name so if finish is empty it is ignored
>> and only count is used.
>>
>> We don't offer a numeric offset since that can't be supported
>> efficiently with a log-structured merge disk format.
>>
>> On Sat, Aug 8, 2009 at 8:57 AM, Jonas Bonér<jo...@jonasboner.com> wrote:
>>> 2009/8/8 Jonathan Ellis <jb...@gmail.com>:
>>>> (either of start and finish may be empty)
>>>
>>> Thanks for fast reply.
>>>
>>> So count is the offset from either start or finish
>>> OR
>>> If start and finish is used then count should be -1 ???
>>>
>>>>
>>>> On Sat, Aug 8, 2009 at 8:41 AM, Jonathan Ellis<jb...@gmail.com> wrote:
>>>>> Stabilizing but not quite finished (329 and 311 are still waiting for
>>>>> review).  But the fundamentals are the same.
>>>>>
>>>>> You have start/finish because that's what defines a range.  You have
>>>>> count because you often want the First N results.
>>>>>
>>>>> -Jonathan
>>>>>
>>>>> On Sat, Aug 8, 2009 at 8:33 AM, Jonas Bonér<jb...@gmail.com> wrote:
>>>>>> Hey guys.
>>>>>>
>>>>>> Is the new API stabilizing?
>>>>>>
>>>>>> How is the new range functions suppose to work?
>>>>>>    public List<Column> get_slice_by_names(String keyspace, String
>>>>>> key, ColumnParent column_parent, List<byte[]> column_names, int
>>>>>> consistency_level) throws InvalidRequestException, NotFoundException,
>>>>>> TException;
>>>>>>
>>>>>>    public List<Column> get_slice(String keyspace, String key,
>>>>>> ColumnParent column_parent, byte[] start, byte[] finish, boolean
>>>>>> is_ascending, int count, int consistency_level) throws
>>>>>> InvalidRequestException, NotFoundException, TException;
>>>>>>
>>>>>> These both have a start, finish and count. I was expecting start and
>>>>>> offset or only start, finish.
>>>>>>
>>>>>> Is the new API documented yet?
>>>>>>
>>>>>> Thanks.
>>>>>>
>>>>>> --
>>>>>> Jonas Bonér
>>>>>>
>>>>>> twitter: @jboner
>>>>>> blog:    http://jonasboner.com
>>>>>> work:   http://crisp.se
>>>>>> work:   http://scalablesolutions.se
>>>>>> code:   http://github.com/jboner
>>>>>>
>>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Jonas Bonér
>>>
>>> twitter: @jboner
>>> blog:    http://jonasboner.com
>>> work:   http://crisp.se
>>> work:   http://scalablesolutions.se
>>> code:   http://github.com/jboner
>>>
>>
>
>
>
> --
> Jonas Bonér
>
> twitter: @jboner
> blog:    http://jonasboner.com
> work:   http://crisp.se
> work:   http://scalablesolutions.se
> code:   http://github.com/jboner
>



-- 
Jonas Bonér

twitter: @jboner
blog:    http://jonasboner.com
work:   http://crisp.se
work:   http://scalablesolutions.se
code:   http://github.com/jboner

Re: new thrift API

Posted by Jonas Bonér <jo...@jonasboner.com>.
Got it. Thanks a lot for amazing support on a Sat. :-)

2009/8/8 Jonathan Ellis <jb...@gmail.com>:
> Count is always the max number of results to return.
>
> So it means, starting with `start`, or the first one if start is
> empty, go until you hit `finish` or `count`, whichever comes first.
> Empty is not a legal column name so if finish is empty it is ignored
> and only count is used.
>
> We don't offer a numeric offset since that can't be supported
> efficiently with a log-structured merge disk format.
>
> On Sat, Aug 8, 2009 at 8:57 AM, Jonas Bonér<jo...@jonasboner.com> wrote:
>> 2009/8/8 Jonathan Ellis <jb...@gmail.com>:
>>> (either of start and finish may be empty)
>>
>> Thanks for fast reply.
>>
>> So count is the offset from either start or finish
>> OR
>> If start and finish is used then count should be -1 ???
>>
>>>
>>> On Sat, Aug 8, 2009 at 8:41 AM, Jonathan Ellis<jb...@gmail.com> wrote:
>>>> Stabilizing but not quite finished (329 and 311 are still waiting for
>>>> review).  But the fundamentals are the same.
>>>>
>>>> You have start/finish because that's what defines a range.  You have
>>>> count because you often want the First N results.
>>>>
>>>> -Jonathan
>>>>
>>>> On Sat, Aug 8, 2009 at 8:33 AM, Jonas Bonér<jb...@gmail.com> wrote:
>>>>> Hey guys.
>>>>>
>>>>> Is the new API stabilizing?
>>>>>
>>>>> How is the new range functions suppose to work?
>>>>>    public List<Column> get_slice_by_names(String keyspace, String
>>>>> key, ColumnParent column_parent, List<byte[]> column_names, int
>>>>> consistency_level) throws InvalidRequestException, NotFoundException,
>>>>> TException;
>>>>>
>>>>>    public List<Column> get_slice(String keyspace, String key,
>>>>> ColumnParent column_parent, byte[] start, byte[] finish, boolean
>>>>> is_ascending, int count, int consistency_level) throws
>>>>> InvalidRequestException, NotFoundException, TException;
>>>>>
>>>>> These both have a start, finish and count. I was expecting start and
>>>>> offset or only start, finish.
>>>>>
>>>>> Is the new API documented yet?
>>>>>
>>>>> Thanks.
>>>>>
>>>>> --
>>>>> Jonas Bonér
>>>>>
>>>>> twitter: @jboner
>>>>> blog:    http://jonasboner.com
>>>>> work:   http://crisp.se
>>>>> work:   http://scalablesolutions.se
>>>>> code:   http://github.com/jboner
>>>>>
>>>>
>>>
>>
>>
>>
>> --
>> Jonas Bonér
>>
>> twitter: @jboner
>> blog:    http://jonasboner.com
>> work:   http://crisp.se
>> work:   http://scalablesolutions.se
>> code:   http://github.com/jboner
>>
>



-- 
Jonas Bonér

twitter: @jboner
blog:    http://jonasboner.com
work:   http://crisp.se
work:   http://scalablesolutions.se
code:   http://github.com/jboner

Re: new thrift API

Posted by Jonathan Ellis <jb...@gmail.com>.
Count is always the max number of results to return.

So it means, starting with `start`, or the first one if start is
empty, go until you hit `finish` or `count`, whichever comes first.
Empty is not a legal column name so if finish is empty it is ignored
and only count is used.

We don't offer a numeric offset since that can't be supported
efficiently with a log-structured merge disk format.

On Sat, Aug 8, 2009 at 8:57 AM, Jonas Bonér<jo...@jonasboner.com> wrote:
> 2009/8/8 Jonathan Ellis <jb...@gmail.com>:
>> (either of start and finish may be empty)
>
> Thanks for fast reply.
>
> So count is the offset from either start or finish
> OR
> If start and finish is used then count should be -1 ???
>
>>
>> On Sat, Aug 8, 2009 at 8:41 AM, Jonathan Ellis<jb...@gmail.com> wrote:
>>> Stabilizing but not quite finished (329 and 311 are still waiting for
>>> review).  But the fundamentals are the same.
>>>
>>> You have start/finish because that's what defines a range.  You have
>>> count because you often want the First N results.
>>>
>>> -Jonathan
>>>
>>> On Sat, Aug 8, 2009 at 8:33 AM, Jonas Bonér<jb...@gmail.com> wrote:
>>>> Hey guys.
>>>>
>>>> Is the new API stabilizing?
>>>>
>>>> How is the new range functions suppose to work?
>>>>    public List<Column> get_slice_by_names(String keyspace, String
>>>> key, ColumnParent column_parent, List<byte[]> column_names, int
>>>> consistency_level) throws InvalidRequestException, NotFoundException,
>>>> TException;
>>>>
>>>>    public List<Column> get_slice(String keyspace, String key,
>>>> ColumnParent column_parent, byte[] start, byte[] finish, boolean
>>>> is_ascending, int count, int consistency_level) throws
>>>> InvalidRequestException, NotFoundException, TException;
>>>>
>>>> These both have a start, finish and count. I was expecting start and
>>>> offset or only start, finish.
>>>>
>>>> Is the new API documented yet?
>>>>
>>>> Thanks.
>>>>
>>>> --
>>>> Jonas Bonér
>>>>
>>>> twitter: @jboner
>>>> blog:    http://jonasboner.com
>>>> work:   http://crisp.se
>>>> work:   http://scalablesolutions.se
>>>> code:   http://github.com/jboner
>>>>
>>>
>>
>
>
>
> --
> Jonas Bonér
>
> twitter: @jboner
> blog:    http://jonasboner.com
> work:   http://crisp.se
> work:   http://scalablesolutions.se
> code:   http://github.com/jboner
>

Re: new thrift API

Posted by Jonas Bonér <jo...@jonasboner.com>.
2009/8/8 Jonathan Ellis <jb...@gmail.com>:
> (either of start and finish may be empty)

Thanks for fast reply.

So count is the offset from either start or finish
OR
If start and finish is used then count should be -1 ???

>
> On Sat, Aug 8, 2009 at 8:41 AM, Jonathan Ellis<jb...@gmail.com> wrote:
>> Stabilizing but not quite finished (329 and 311 are still waiting for
>> review).  But the fundamentals are the same.
>>
>> You have start/finish because that's what defines a range.  You have
>> count because you often want the First N results.
>>
>> -Jonathan
>>
>> On Sat, Aug 8, 2009 at 8:33 AM, Jonas Bonér<jb...@gmail.com> wrote:
>>> Hey guys.
>>>
>>> Is the new API stabilizing?
>>>
>>> How is the new range functions suppose to work?
>>>    public List<Column> get_slice_by_names(String keyspace, String
>>> key, ColumnParent column_parent, List<byte[]> column_names, int
>>> consistency_level) throws InvalidRequestException, NotFoundException,
>>> TException;
>>>
>>>    public List<Column> get_slice(String keyspace, String key,
>>> ColumnParent column_parent, byte[] start, byte[] finish, boolean
>>> is_ascending, int count, int consistency_level) throws
>>> InvalidRequestException, NotFoundException, TException;
>>>
>>> These both have a start, finish and count. I was expecting start and
>>> offset or only start, finish.
>>>
>>> Is the new API documented yet?
>>>
>>> Thanks.
>>>
>>> --
>>> Jonas Bonér
>>>
>>> twitter: @jboner
>>> blog:    http://jonasboner.com
>>> work:   http://crisp.se
>>> work:   http://scalablesolutions.se
>>> code:   http://github.com/jboner
>>>
>>
>



-- 
Jonas Bonér

twitter: @jboner
blog:    http://jonasboner.com
work:   http://crisp.se
work:   http://scalablesolutions.se
code:   http://github.com/jboner

Re: new thrift API

Posted by Jonathan Ellis <jb...@gmail.com>.
(either of start and finish may be empty)

On Sat, Aug 8, 2009 at 8:41 AM, Jonathan Ellis<jb...@gmail.com> wrote:
> Stabilizing but not quite finished (329 and 311 are still waiting for
> review).  But the fundamentals are the same.
>
> You have start/finish because that's what defines a range.  You have
> count because you often want the First N results.
>
> -Jonathan
>
> On Sat, Aug 8, 2009 at 8:33 AM, Jonas Bonér<jb...@gmail.com> wrote:
>> Hey guys.
>>
>> Is the new API stabilizing?
>>
>> How is the new range functions suppose to work?
>>    public List<Column> get_slice_by_names(String keyspace, String
>> key, ColumnParent column_parent, List<byte[]> column_names, int
>> consistency_level) throws InvalidRequestException, NotFoundException,
>> TException;
>>
>>    public List<Column> get_slice(String keyspace, String key,
>> ColumnParent column_parent, byte[] start, byte[] finish, boolean
>> is_ascending, int count, int consistency_level) throws
>> InvalidRequestException, NotFoundException, TException;
>>
>> These both have a start, finish and count. I was expecting start and
>> offset or only start, finish.
>>
>> Is the new API documented yet?
>>
>> Thanks.
>>
>> --
>> Jonas Bonér
>>
>> twitter: @jboner
>> blog:    http://jonasboner.com
>> work:   http://crisp.se
>> work:   http://scalablesolutions.se
>> code:   http://github.com/jboner
>>
>

Re: new thrift API

Posted by Jonathan Ellis <jb...@gmail.com>.
Stabilizing but not quite finished (329 and 311 are still waiting for
review).  But the fundamentals are the same.

You have start/finish because that's what defines a range.  You have
count because you often want the First N results.

-Jonathan

On Sat, Aug 8, 2009 at 8:33 AM, Jonas Bonér<jb...@gmail.com> wrote:
> Hey guys.
>
> Is the new API stabilizing?
>
> How is the new range functions suppose to work?
>    public List<Column> get_slice_by_names(String keyspace, String
> key, ColumnParent column_parent, List<byte[]> column_names, int
> consistency_level) throws InvalidRequestException, NotFoundException,
> TException;
>
>    public List<Column> get_slice(String keyspace, String key,
> ColumnParent column_parent, byte[] start, byte[] finish, boolean
> is_ascending, int count, int consistency_level) throws
> InvalidRequestException, NotFoundException, TException;
>
> These both have a start, finish and count. I was expecting start and
> offset or only start, finish.
>
> Is the new API documented yet?
>
> Thanks.
>
> --
> Jonas Bonér
>
> twitter: @jboner
> blog:    http://jonasboner.com
> work:   http://crisp.se
> work:   http://scalablesolutions.se
> code:   http://github.com/jboner
>