sstableloader and ttls
Hi! If I use sstableloader to load data to a cluster, and the source sstables contain some columns where the TTL has expired, i.e. the sstable has not yet been compacted - will those entries be properly removed on the destination side? Thanks, \EF
Running sstableloader from live Cassandra server
Hi! I'm looking into moving some data from one Cassandra cluster to another, both of them running Cassandra 1.2.13 (or maybe some later 1.2 version if that helps me avoid some fatal bug). Sstableloader will probably be the right thing for me, and given the size of my tables, I will want to run the sstableloader on the source cluster, but at the same time, that source cluster needs to keep running to serve data to clients. If I understand the docs right, this means I will have to: 1. Bring up a new network interface on each of my source nodes. No problem, I have an IPv6 /64 to choose from :-) 2. Put a cassandra.yaml in the classpath of the sstableloader that differs from the one in /etc/cassandra/conf, i.e. the one used by the source cluster's cassandra, with the following: * listen_address set to my new interface. * rpc_address set to my new interface. * rpc_port set as on the destination cluster (i.e. 9160) * cluster_name set as on the destination cluster. * storage_port as on the destination cluster (i.e. 7000) Given the above I should be able to run sstableloader on the nodes of my source cluster, even with source cluster cassandra daemon running. Am I right, or did I miss anything? Thanks, \EF
insert two records with same primary key via batch
Hi, I'm trying this cql against cassandra 2.0.9: BEGIN BATCH INSERT INTO cqlengine_test_lwt.test_if_not_exists_model (id, count, text) VALUES (1, 8, '123'); INSERT INTO cqlengine_test_lwt.test_if_not_exists_model (id, count, text) VALUES (1, 9, '111'); APPLY BATCH; In this case, id is the primary key. And when querying the record with id=1, the result I got is (id=1, count=9, text='123'), while I expect the result should be (id=1, count=9, text='111'). Did I miss anything or is this result expected? B.R, Mission.
Re: insert two records with same primary key via batch
You're running into funny results due to the way CQL3 handles statements in batches. Read this: https://github.com/doanduyhai/Achilles/wiki/Batch-Mode#statements-ordering There is already a JIRA opened but according to the developers this is the expected behavior. In your example, largest value for column "count" is 9 and largest value for "text" is "123" (sorted by lexicographic order) On Sat, Aug 16, 2014 at 1:45 PM, 廖欽啟 wrote: > Hi, > >I'm trying this cql against cassandra 2.0.9: >BEGIN BATCH > INSERT INTO cqlengine_test_lwt.test_if_not_exists_model (id, count, > text) VALUES (1, 8, '123'); > INSERT INTO cqlengine_test_lwt.test_if_not_exists_model (id, count, > text) VALUES (1, 9, '111'); >APPLY BATCH; > >In this case, id is the primary key. >And when querying the record with id=1, the result I got is (id=1, > count=9, text='123'), while I expect >the result should be (id=1, count=9, text='111'). > >Did I miss anything or is this result expected? > > B.R, > Mission. >
Re: insert two records with same primary key via batch
wow, that's really interesting. Thanks for saving my time. On 16 August 2014 20:56, DuyHai Doan wrote: > You're running into funny results due to the way CQL3 handles statements > in batches. Read this: > https://github.com/doanduyhai/Achilles/wiki/Batch-Mode#statements-ordering > > There is already a JIRA opened but according to the developers this is the > expected behavior. > > In your example, largest value for column "count" is 9 and largest value > for "text" is "123" (sorted by lexicographic order) > > > On Sat, Aug 16, 2014 at 1:45 PM, 廖欽啟 wrote: > >> Hi, >> >>I'm trying this cql against cassandra 2.0.9: >>BEGIN BATCH >> INSERT INTO cqlengine_test_lwt.test_if_not_exists_model (id, count, >> text) VALUES (1, 8, '123'); >> INSERT INTO cqlengine_test_lwt.test_if_not_exists_model (id, count, >> text) VALUES (1, 9, '111'); >>APPLY BATCH; >> >>In this case, id is the primary key. >>And when querying the record with id=1, the result I got is (id=1, >> count=9, text='123'), while I expect >>the result should be (id=1, count=9, text='111'). >> >>Did I miss anything or is this result expected? >> >> B.R, >> Mission. >> > >