我有一个列族,如下:
CREATE TABLE keyspace.tableName (
key text PRIMARY KEY,
A blob,
B text,
C text,
D blob,
"E" text
H int
) WITH COMPACT STORAGE
AND bloom_filter_fp_chance = 0.2
AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
AND comment = ''
AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.SnappyCompressor'}
AND dclocal_read_repair_chance = 0.0
AND default_time_to_live = 7776000
AND gc_grace_seconds = 3600
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.1
AND speculative_retry = '99.0PERCENTILE';
通过查询发出读取请求时:
SELECT A, B, C, D, E, WRITETIME(A), WRITETIME(B) FROM TABLE_NAME WHERE KEY = ?;
我遇到以下异常:
com.datastax.driver.core.exceptions.ReadTimeoutException: Cassandra timeout during read query at consistency LOCAL_ONE (1 responses were required but only 0 replica responded)
at com.datastax.driver.core.exceptions.ReadTimeoutException.copy(ReadTimeoutException.java:88)
这是一个庞大的集群,每天处理数十亿个请求。我仅在不到0.1%的请求中得到了这一点。我的第99个百分点很好。 GC不到1秒,但是我确实在tpstats中看到一些READ消息被丢弃。 SSTable的中位数小于3。我的查询显示,一段时间以来我不再读取同一键,因此我的键缓存命中率小于10%。我的读取请求超时为200毫秒。
任何人都可以给我有关调试方法的任何提示吗?