I was trying to mix CQL2 and CQL3 to check whether a columnfamily with
compound keys can be further indexed. Because using CQL3 secondary indexing
on table with composite PRIMARY KEY is not possible. And surprisingly by
mixing the CQL versions i was able to do so. But when i want to insert
anything in the column family it gives me a rpc_timeout exception. I
personally found it quite abnormal, so thought of posting this thing in
forum.


Best,

On Mon, Dec 10, 2012 at 6:29 PM, Sylvain Lebresne <sylv...@datastax.com>wrote:

> On Mon, Dec 10, 2012 at 12:36 PM, Abhijit Chanda <
> abhijit.chan...@gmail.com> wrote:
>
>> Hi All,
>>
>> I have a column family which structure is
>>
>> CREATE TABLE practice (
>>   id text,
>>   name text,
>>   addr text,
>>   pin text,
>>   PRIMARY KEY (id, name)
>> ) WITH
>>   comment='' AND
>>   caching='KEYS_ONLY' AND
>>   read_repair_chance=0.100000 AND
>>   gc_grace_seconds=864000 AND
>>   replicate_on_write='true' AND
>>   compaction_strategy_class='SizeTieredCompactionStrategy' AND
>>   compression_parameters:sstable_compression='SnappyCompressor';
>>
>> CREATE INDEX idx_address ON practice (addr);
>>
>> Initially i have made the column family using CQL 3.0.0. Then for
>> creating the index i have used CQL 2.0.
>>
>> Now when want to insert any data in the column family it always shows  a
>> timeout exception.
>> INSERT INTO practice (id, name, addr,pin) VALUES (
>> '1','AB','kolkata','700052');
>> Request did not complete within rpc_timeout.
>>
>>
>>
>> Please suggest me where i am getting wrong?
>>
>
> That would be creating the index through CQL 2. Why did you use CQL 3 for
> the CF creation
> and CQL 2 for the index one? If you do both in CQL 3, that should work as
> expected.
>
> That being said, you should probably not get timeouts (that won't do what
> you want though).
> If you look at the server log, do you have an exception there?
>
> --
> Sylvain
>
>


-- 
Abhijit Chanda
Analyst
VeHere Interactive Pvt. Ltd.
+91-9748888395

Reply via email to