Hi,
can this https://docs.datastax.com/en/developer/java-driver/2.1/manual/paging/
help you?
Best regards, Vladimir Yudovin,
Winguzone - Cloud Cassandra Hosting
On Wed, 21 Jun 2017 02:44:17 -0400 web master
socketman2...@gmail.com wrote
I am migrating from MySql to
The syntax suggested by Ondrej is not working in some case in 2.0.11 and
logged an issue for the same.
https://issues.apache.org/jira/browse/CASSANDRA-8797
Thanks
Ajay
On Feb 12, 2015 11:01 PM, Bulat Shakirzyanov
bulat.shakirzya...@datastax.com wrote:
Fixed my Mail.app settings so you can see
Thanks Eric. I figured out the same but didn't get time to put it on the
mail. Thanks.
But it is highly tied up to how data is stored internally in Cassandra.
Basically how partition keys are used to distribute (less likely to change.
We are not directly dependence on the partition algo) and
Your page state then needs to track the last ck1 and last ck2 you saw.
Pages 2+ will end up needing to be up to two queries if the first query
doesn't fill the page size.
CREATE TABLE foo (
partitionkey int,
ck1 int,
ck2 int,
col1 int,
col2 int,
PRIMARY KEY ((partitionkey), ck1, ck2)
Thanks Ondřej! Definitely much easier.
N/B, this is a new feature in 2.0.x, it will not work in 1.2.x.
cqlsh:scratch SELECT * FROM foo WHERE partitionkey = 1 and (ck1, ck2)
(1,2) limit 2;
Bad Request: line 1:45 no viable alternative at input '('
On Thu, Feb 12, 2015 at 8:44 AM, Ondřej Nešpor
There is a much easier way to do that (and I suppose the Java driver
does it this way):
page 1:
SELECT * FROM foo WHERE partitionkey = 1 limit 2;
partitionkey | ck1 | ck2 | col1 | col2
--+-+-+--+--
1 | 1 | 3 |3 |3
1 | 1 | 2
I don't know what the shape of the page state data is deep inside the
JavaDriver, I've actually tried to dig into that in the past and understand
it to see if I could reproduce it as a general purpose any-query kind of
thing. I gave up before I fully understood it, but I think it's actually a
Hello,
As was mentioned earlier, the Java driver doesn’t actually perform pagination.
Instead, it uses cassandra native protocol to set page size of the result set.
(https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v2.spec#L699-L730
Hi Eric,
Thanks for your reply.
I am using Cassandra 2.0.11 and in that I cannot append condition like last
clustering key column value of the last row in the previous batch. It
fails Preceding column is either not restricted or by a non-EQ relation. It
means I need to specify equal condition
Basically I am trying different queries with your approach.
One such query is like
Select * from mycf where condition on partition key order by ck1 asc, ck2
desc where ck1 and ck2 are clustering keys in that order.
Here how do we achieve pagination support?
Thanks
Ajay
On Feb 11, 2015 11:16
I can't believe that everyone read process all rows at once (without
pagination).
Probably not too many people try to read all rows in a table as a single
rolling operation with a standard client driver. But those who do would
use token() to keep track of where they are and be able to resume
Thanks Alex.
But is there any workaround possible?. I can't believe that everyone read
process all rows at once (without pagination).
Thanks
Ajay
On Feb 10, 2015 11:46 PM, Alex Popescu al...@datastax.com wrote:
On Tue, Feb 10, 2015 at 4:59 AM, Ajay ajay.ga...@gmail.com wrote:
1) Java
On Tue, Feb 10, 2015 at 4:59 AM, Ajay ajay.ga...@gmail.com wrote:
1) Java driver implicitly support Pagination in the ResultSet (using
Iterator) which can be controlled through FetchSize. But it is limited in a
way that we cannot skip or go previous. The FetchState is not exposed.
Cassandra
The short answer is yes, you can rely on the ordering of keys being
consistent. They will always be returned in partitioner order.
This is pretty much implied by the existence of the token() function so
it's not going to change (if only because changing it would break people).
--
Sylvain
On
Its the same idea.
If you want to get 50 columns ask for 51, iterate over the first 50 and use the
51st as the first column for the next page. If you get 51 column then you are
at the end of the page.
I've not used Kundera so cannot talk about specifics.
Cheers
-
Aaron
Thank you Aaron , that link helps.
However, In my application , I am using jpa(Kundera) to query cassandra.
Is there a way to achieve this in cql or jpa query language?
Thanks,
Snehal
On 9 January 2013 16:28, aaron morton aa...@thelastpickle.com wrote:
Try this
Try this http://wiki.apache.org/cassandra/FAQ#iter_world
Take a look at the code examples it points to.
Cheers
-
Aaron Morton
Freelance Cassandra Developer
New Zealand
@aaronmorton
http://www.thelastpickle.com
On 10/01/2013, at 11:55 AM, Snehal Nagmote
Do you really require page numbers? I usually find them annoying while
paging through a forum, especially if it is quite active. Threads from the
bottom of the page get bumped to the next page so you end up seeing the
same content again. I much prefer the first page being the current N
results,
causing problems.
Cheers
Sam
Date: Tue, 27 Nov 2012 13:01:48 -0700
Subject: Re: Pagination
From: de...@fyrie.net
To: user@cassandra.apache.org
Do you really require page numbers? I usually find them annoying while paging
through a forum, especially if it is quite active. Threads from the bottom
Short answer: that's a bad idea; don't do it.
Long answer: you could count 10 pages of results and jump there
manually, which is what offset 10 * page_size is doing for you under
the hood, but that gets slow quickly as your offset grows. Which is
why you shouldn't do it with a SQL db either.
On
+1. There is some disagreement on whether or not the API should
return empty columns or skip rows when no data is found. In all of
our use cases, we would prefer skipped rows. And based on how
frequently new cassandra users appear to be confused about the current
behaviour, this might be a more
On Fri, May 7, 2010 at 5:29 AM, Joost Ouwerkerk jo...@openplaces.orgwrote:
+1. There is some disagreement on whether or not the API should
return empty columns or skip rows when no data is found. In all of
our use cases, we would prefer skipped rows. And based on how
frequently new
Hey Ian,
I actually just wrote a quick example of how to iterate over a CF that may
have tombstones. This may help you out:
http://markjgreene.wordpress.com/2010/05/05/iterate-over-entire-cassandra-column-family/
On Thu, May 6, 2010 at 12:17 PM, Ian Kallen spidaman.l...@gmail.com wrote:
I read
Thanks Mark, great illustration. I'm already splitting my time developing
directly with hector and a vastly simplified jython wrapper around it; I
guess I'll address it at some wrapping layer (patch hector or let the jython
layer deal).
My grumpy editorial about this stuff is that on the
Our solution at SimpleGeo has been to hack Cassandra to (optionally, at
least) be sensible and drop Rows that don't have any Columns. The claim from
the FAQ that Cassandra would have to check if there are any other columns
in the row is inaccurate. The common case for us at least is that we're
On Thu, May 6, 2010 at 3:27 PM, Ian Kallen spidaman.l...@gmail.com wrote:
Cool, is this a patch you've applied on the server side? Are you running
0.6.x? I'm wondering if this kind of thing can make it into future versions
of Cassandra.
Yea, server side. It's basically doing the same thing
26 matches
Mail list logo