Thanks for the hint.

I found out it was "too many opened files" error and the server side
just lost response to the get_range_slice() request by throwing out an
exception.

Now works with "ulimit -n 32768".

Kevin

-------- ???????? --------
??????: Jonathan Ellis <jbel...@gmail.com>
??????: user@cassandra.apache.org
????: [***SPAM*** ] Re: problem when trying to get_range_slice()
????: Thu, 3 Jun 2010 19:07:28 -0700

use smaller slices and page through the data

2010/6/3 Shuai Yuan <yuansh...@supertool.net.cn>:
> Hi all,
>
> ----my env----
>
> 6 servers with about 200GB data.
>
> data structure,
>
> 64B rowkey + (5B column)*20,
> rowkey and column.value are all random bytes from a-z,A-Z,0-9
>
> ----problem----
>
> when I tried iterate over the data in the storage, I always get
> org::apache::cassandra::TimedOutException
> (RpcTimeout = 2minutes)
>
> ----questions----
>
> 1.How could I iterate over my data then?
>
> 2.In the code below, I gave key_start/end/count twice, one for
> get_range_slice() and the other for SlicePreditor. Are they the same?
>
> Thanks!
>
> ----scan-data application----
>
>        CassandraFactory factory(argv[1], 9160);
>        tr1::shared_ptr<Cassandra> client(factory.create());
>
>        Keyspace *key_space = client->getKeyspace("campaign");
>
>        map<string, vector<Column> > mResult;
>        ColumnParent cp;
>        SlicePredicate sp;
>        string szStart, szEnd;
>        uint32_t uCount = 100; //try to retrieve 100 keys?
>
>        szStart =
> "0000000000000000000000000000000000000000000000000000000000000000";
>        szEnd =
> "1000000000000000000000000000000000000000000000000000000000000000";
>
>        cp.column_family = "test_col";
>
>        sp.__isset.slice_range = true;
>        sp.slice_range.start =
> "0000000000000000000000000000000000000000000000000000000000000000";
>        sp.slice_range.finish =
> "1000000000000000000000000000000000000000000000000000000000000000";
>        sp.slice_range.count = 100;
>
>        try {
>                mResult = key_space->getRangeSlice(cp, sp, szStart, szEnd,
> uCount); //by libcassandra, mainly invoking get_range_slice()
>
>                /* then iterate the result and output */
>                        }
>                }
>        } catch (org::apache::cassandra::InvalidRequestException &ire) {
>                cout << ire.why << endl;
>                delete key_space;
>                return 1;
>        }
>
>        return 0;
> --
> Kevin Yuan
> www.yuan-shuai.info
>
>
>






Reply via email to