I am running some Cassandra queries. When I run
select * from logtable;
I get this error:
<ErrorMessage code=0000 [Server error] message="java.lang.ArrayIndexOutOfBoundsException">
However, if I run with limits, some rows are OK:
select * from logtable limit 100;
This works. I keep increasing the limit and eventually, I get the error again. It's obvious that our software adds some corrupted data. My question is this: is there a way to find out what is happening using cqlsh? I can't study the code, because it's extremely messed up, it's a nightmare. I couldn't find anything useful in system.log. This is the table:
cqlsh:mykeyspace> desc table logtable
CREATE TABLE mykeyspace.logtable (
key text,
key2 text,
column1 text,
column2 text,
column3 text,
column4 text,
value blob,
PRIMARY KEY ((key, key2), column1, column2, column3, column4)
) WITH COMPACT STORAGE
AND CLUSTERING ORDER BY (column1 ASC, column2 ASC, column3 ASC, column4 ASC)
AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
AND comment = ''
AND compaction = {'min_threshold': '4', 'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = 'NONE';
Thanks.
Regards, Serban
The following recommendations will help you in your SQL tuning process.
You'll find 3 sections below:
SELECT
*
FROM
logtable