incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Ellis <jbel...@gmail.com>
Subject Re: Cassandra paging, gathering stats
Date Mon, 22 Feb 2010 22:42:42 GMT
Breaking sooner rather than later is a feature, of sorts.  You really
do need to give a sane max.  Remember that thrift must pull results
into memory before giving them back to you, so allowing you to give it
a max that cannot possibly fit in memory is not doing you a favor.

-Jonathan

On Mon, Feb 22, 2010 at 4:40 PM, Sonny Heer <sonnyheer@gmail.com> wrote:
> Is this a bug?
>
>
>                ColumnParent columnParent = new ColumnParent(cp, null);
>                SlicePredicate slicePredicate = new SlicePredicate();
>
>                // Get all columns
>                SliceRange sliceRange = new SliceRange(new byte[] {}, new
> byte[] {}, false, Integer.MAX_VALUE);
>                slicePredicate.setSlice_range(sliceRange);
>
>                List<KeySlice> columns;
>
>                try {
>                                columns = client.get_range_slice(keySpaceStr,
columnParent,
> slicePredicate, "STU", "T", 1000000, ConsistencyLevel.ONE);
>
>
> the client.get_range_slice has ~100 rows returned.  when i change the
> count above 1000000 (or some # below int max) it works fine.   When I
> change the value to Integer.MAX_VALUE it fails with the Java heap
> space error.  I've tried upping the heap size to 1024 as well.  Even
> though the total results returned is the same (~100) why would it not
> work with int max?  Is something being built based on this count value
> passed in?
>

Mime
View raw message