I am facing some peculiar problem in DSE 3.2.4, here is my table structure,
CREATE TABLE tbl_samp (
PK text,
CK1 varint,
CK2 text,
CK3 varint,
value float,
PRIMARY KEY (PK, CK1, CK2, CK3)
) WITH
bloom_filter_fp_chance=0.010000 AND
caching='KEYS_ONLY' AND
comment='' AND
dclocal_read_repair_chance=0.000000 AND
gc_grace_seconds=864000 AND
read_repair_chance=0.100000 AND
replicate_on_write='true' AND
populate_io_cache_on_flush='false' AND
compaction={'class': 'SizeTieredCompactionStrategy'} AND
compression={'sstable_compression': 'SnappyCompressor'};
I am dumping huge amount of data from pig to cassandra using CqlStorage();
I have around 1.12 million distinct combinations of (PK, CK1, CK2, CK3)
so when I finished running PIG
here is my Pig Relation
reqDataCQL = foreach reqData generate TOTUPLE(TOTUPLE('PK',PK), TOTUPLE('CK1',CK1), TOTUPLE('Ck2',CK2), TOTUPLE('CK3',Ck3)), TOTUPLE(value);
store reqDataCQL into 'cql://MyKeyspace/tbl_samp?output_query=update+MyKeyspace.tbl_samp+set+value+%3D+%3F' using CqlStorage();
I can see following
Input(s):
Successfully read 34327 records from: "/user/k/Input.txt"
Successfully read 4 records from: "cql://MyKeySpace/mappingtable"
Output(s):
Successfully stored 1128902 records in: "cql://MyKeySpace/tbl_samp?output_query=update+conflux.to1+set+value+%3D+%3F"
But when I Query the table tbl_samp I can see only 8600 records which are combination of (PK and CK1)
here is my count query
select count(1) from tbl_samp limit 2000000;
count
-------
8681
Is there any gap in my understanding of Composite Key?
I know PK is my RowKey and (CK1,CK2,CK3) combinations with Value will be my column name
My understanding in Cassandra Composite is
PK,(CK1|CK2|CK3|value:1),(CK11|CK22|CK33|value:11)
PK1,(CK111|CK222|CK333|value:111)
please help me on this