【发布时间】:2015-05-26 03:12:13
【问题描述】:
我有一个三节点 Cassandra 集群运行得非常好。当我在集群的一个节点上进行select count(*) from usertracking; 查询时。我收到以下错误:
errors={}, last_host=localhost
Statement trace did not complete within 10 seconds
虽然,它在集群的其余两个节点上运行良好。谁能告诉我为什么我只在一个节点上收到此错误以及错误的原因是什么?
正如https://stackoverflow.com/questions/27766976/cassandra-cqlsh-query-fails-with-no-error 中给出的,我还在 cassandra.yaml 中增加了超时参数read_request_timeout_in_ms and range_request_timeout_in_ms。但这没有帮助。
KeySpace 定义:
CREATE KEYSPACE cw WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', 'datacenter1' : 3 };
表定义:
CREATE TABLE usertracking (
cwc text,
cur_visit_id text,
cur_visit_datetime timestamp,
cur_visit_last_ts bigint,
prev_visit_datetime timestamp,
prev_visit_last_ts bigint,
tot_page_view bigint,
tot_time_spent bigint,
tot_visit_count bigint,
PRIMARY KEY (cwc)
);
节点工具状态的输出:
Datacenter: datacenter1
=======================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns Host ID Rack
UN 192.168.1.200 146.06 MB 1 ? 92c5bd4a-8f2b-4d7b-b420-6261a1bb8648 rack1
UN 192.168.1.201 138.53 MB 1 ? 817d331b-4cc0-4770-be6d-7896fc00e82f rack1
UN 192.168.1.202 155.04 MB 1 ? 351731fb-c3ad-45e0-b2c8-bc1f3b1bf25d rack1
nodetool tpstats的输出:
Pool Name Active Pending Completed Blocked All time blocked
CounterMutationStage 0 0 0 0 0
ReadStage 0 0 25 0 0
RequestResponseStage 0 0 257103 0 0
MutationStage 0 0 593226 0 0
ReadRepairStage 0 0 0 0 0
GossipStage 0 0 612335 0 0
CacheCleanupExecutor 0 0 0 0 0
AntiEntropyStage 0 0 0 0 0
MigrationStage 0 0 0 0 0
ValidationExecutor 0 0 0 0 0
CommitLogArchiver 0 0 0 0 0
MiscStage 0 0 0 0 0
MemtableFlushWriter 0 0 87 0 0
MemtableReclaimMemory 0 0 87 0 0
PendingRangeCalculator 0 0 3 0 0
MemtablePostFlush 0 0 2829 0 0
CompactionExecutor 0 0 216 0 0
InternalResponseStage 0 0 0 0 0
HintedHandoff 0 0 2 0 0
Message type Dropped
RANGE_SLICE 0
READ_REPAIR 0
PAGED_RANGE 0
BINARY 0
READ 0
MUTATION 0
_TRACE 0
REQUEST_RESPONSE 0
COUNTER_MUTATION 0
【问题讨论】:
-
这是一个症状,通过增加超时来修复它可能无法解决整体问题。你能分享
nodetool status和nodetool tpstats的输出吗(后者应该在查询运行期间执行)。也看看表定义可能对我们有帮助。 -
@Lyuben 我已经更新了这个问题。如果有帮助请看一下
标签: cassandra cassandra-2.0 cqlsh cassandra-cli