cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mohammed Guller <>
Subject RE: Retrieving all row keys of a CF
Date Sat, 17 Jan 2015 00:00:29 GMT
I am curious if you had better luck with the AllRowsReader recipe.


From: Eric Stevens []
Sent: Friday, January 16, 2015 12:33 PM
Subject: Re: Retrieving all row keys of a CF

Note that getAllRows() is deprecated in Astyanax (see here<>).

You should prefer to use the AllRowsReader recipe:

Note the section titled Reading only the row keys<>,
which seems to match your use case exactly.  You should start getting row keys back very,
very quickly.

On Fri, Jan 16, 2015 at 11:32 AM, Ruchir Jha <<>>
We have a column family that has about 800K rows and on an average about a million columns.
I am interested in getting all the row keys in this column family and I am using the following
Astyanax code snippet to do this.
This query never finishes (ran it for 2 days but did not finish).

This query however works with CF's that have lesser number of columns. This leads me to believe
that there might be an API that just retrieves the row keys and does not depend on the number
of columns in the CF. Any suggestions are appreciated.

I am running Cassandra 2.0.9 and this is a 4 node cluster.

RangeBuilder().setLimit(1).build()).executeWithCallback(new RowCallback<String, T>()

                                                            public boolean failure(ConnectionException
                                                                        return true;

                                                            public void success(Rows<String,
T> rows)
                                                                        // iterating over
rows here

View raw message