more info:

CL = ONE,

replica = 2,

and when I tried to monitor the disk_io with iostat I get almost 0MB/s
read & 0% CPU on the machine the scan-data app started on.

Thanks!

-------- ???????? --------
??????: Shuai Yuan <yuansh...@supertool.net.cn>
??????: user@cassandra.apache.org
????: [***SPAM*** ] problem when trying to get_range_slice()
????: Thu, 03 Jun 2010 15:57:14 +0800

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