incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shuai Yuan <yuansh...@supertool.net.cn>
Subject Re: [***SPAM*** ] Re: problem when trying to get_range_slice()
Date Fri, 04 Jun 2010 02:56:44 GMT
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 <jbellis@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 <yuanshuai@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
>
>
>







Mime
View raw message