主键查询cassandra不起作用

时间:2016-12-23 04:13:52

标签: cassandra

我在Cassandra中查询时遇到了一个错误的问题。

这是我桌子的定义:

CREATE TABLE test.ecgs (
uuid timeuuid PRIMARY KEY,
content blob,
filename text,
image blob,
images list<blob>,
page_count int,
thumb blob
) WITH bloom_filter_fp_chance = 0.01
AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
AND comment = ''
AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'}
AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND crc_check_chance = 1.0
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 = '99PERCENTILE';

当我查询时:

SELECT filename, content FROM ecgs 
WHERE uuid=63dc8442-bf06-11e6-9302-33bde07f6029

...来自终端和脚本,它显示奇怪的回报。 首先是记录显示,但有时我无法过滤掉记录。我确信数据存在于我的数据中心。

这是我的测试数据中心的配置:

CREATE KEYSPACE test WITH replication = {'class': 'NetworkTopologyStrategy', 'dc1': '2'}  AND durable_writes = true;

有人可以给我一些想法吗?

于12月27日更新。

状态nodetool:

Datacenter: dc1
===============
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address        Load       Tokens       Owns    Host ID                                    Rack
UN  192.168.0.102  1.27 GB    256          ?       607bb62d-0bf6-425e-a804-568af02de0bc  rack1
UN  192.168.0.103  1.22 GB    256          ?       988ab168-f3d5-41a4-ab16-200079b3dc17  rack1

0 个答案:

没有答案