Cassandra Can';t trace在卡桑德拉暗示了交接

Cassandra Can';t trace在卡桑德拉暗示了交接,cassandra,Cassandra,我试图在Docker中使用Cassandra集群模拟暗示切换 提示切换处于活动状态: root@2f5aa8d649e2:/# nodetool statushandoff Hinted handoff is running 键空间的复制系数为3: cqlsh> DESCRIBE KEYSPACE imdb; CREATE KEYSPACE imdb WITH replication = {'class': 'NetworkTopologyStrategy', 'dc1': '2',

我试图在Docker中使用Cassandra集群模拟暗示切换

提示切换处于活动状态:

root@2f5aa8d649e2:/# nodetool statushandoff
Hinted handoff is running
键空间的复制系数为3:

cqlsh> DESCRIBE  KEYSPACE imdb;
CREATE KEYSPACE imdb WITH replication = {'class': 'NetworkTopologyStrategy', 'dc1': '2', 'dc2': '1'}  AND durable_writes = true;
然后关闭一个节点,打开跟踪并插入新行:

cqlsh:imdb> insert into movies_by_actor (actor, movie_id, character, movie_title, salary) values ('TomHanks', uuid(), 'Character', 'Title', 1000);

Tracing session: e4a2cc20-42ce-11e7-bd49-cf534e0135c6

 activity                                                                                                                                                                     | timestamp                  | source     | source_elapsed | client
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------+------------+----------------+-----------
                                                                                                                                                           Execute CQL3 query | 2017-05-27 11:23:22.466000 | 172.13.0.2 |              0 | 127.0.0.1
 Parsing insert into movies_by_actor (actor, movie_id, character, movie_title, salary) values ('TomHanks', uuid(), 'Character', 'Title', 1000); [Native-Transport-Requests-1] | 2017-05-27 11:23:22.467000 | 172.13.0.2 |            364 | 127.0.0.1
                                                                                                                            Preparing statement [Native-Transport-Requests-1] | 2017-05-27 11:23:22.467000 | 172.13.0.2 |            727 | 127.0.0.1
                                                                                                              Determining replicas for mutation [Native-Transport-Requests-1] | 2017-05-27 11:23:22.468000 | 172.13.0.2 |           1354 | 127.0.0.1
                                                                                        Sending MUTATION message to /172.13.0.3 [MessagingService-Outgoing-/172.13.0.3-Small] | 2017-05-27 11:23:22.468000 | 172.13.0.2 |           1722 | 127.0.0.1
                                                                                        Sending MUTATION message to /172.13.0.6 [MessagingService-Outgoing-/172.13.0.6-Small] | 2017-05-27 11:23:22.468000 | 172.13.0.2 |           1722 | 127.0.0.1
                                                                                           MUTATION message received from /172.13.0.2 [MessagingService-Incoming-/172.13.0.2] | 2017-05-27 11:23:22.469000 | 172.13.0.3 |             30 | 127.0.0.1
                                                                                           MUTATION message received from /172.13.0.2 [MessagingService-Incoming-/172.13.0.2] | 2017-05-27 11:23:22.469000 | 172.13.0.6 |             35 | 127.0.0.1
                                                                                                                                     Appending to commitlog [MutationStage-1] | 2017-05-27 11:23:22.469000 | 172.13.0.3 |            294 | 127.0.0.1
                                                                                                                                     Appending to commitlog [MutationStage-1] | 2017-05-27 11:23:22.469000 | 172.13.0.6 |            292 | 127.0.0.1
                                                                                                                         Adding to movies_by_actor memtable [MutationStage-1] | 2017-05-27 11:23:22.469000 | 172.13.0.6 |            486 | 127.0.0.1
                                                                                                                          Enqueuing response to /172.13.0.2 [MutationStage-1] | 2017-05-27 11:23:22.469000 | 172.13.0.6 |            660 | 127.0.0.1
                                                                                   REQUEST_RESPONSE message received from /172.13.0.3 [MessagingService-Incoming-/172.13.0.3] | 2017-05-27 11:23:22.470000 | 172.13.0.2 |           3659 | 127.0.0.1
                                                                                                                Processing response from /172.13.0.3 [RequestResponseStage-2] | 2017-05-27 11:23:22.470000 | 172.13.0.2 |           3820 | 127.0.0.1
                                                                                Sending REQUEST_RESPONSE message to /172.13.0.2 [MessagingService-Outgoing-/172.13.0.2-Small] | 2017-05-27 11:23:22.472000 | 172.13.0.6 |           3533 | 127.0.0.1
                                                                                   REQUEST_RESPONSE message received from /172.13.0.6 [MessagingService-Incoming-/172.13.0.6] | 2017-05-27 11:23:22.473000 | 172.13.0.2 |             34 | 127.0.0.1
                                                                                                                Processing response from /172.13.0.6 [RequestResponseStage-3] | 2017-05-27 11:23:22.473000 | 172.13.0.2 |            523 | 127.0.0.1
                                                                                                                                                             Request complete | 2017-05-27 11:23:22.469919 | 172.13.0.2 |           3919 | 127.0.0.1
从日志中可以看出,协调器节点
172.13.0.2
处理请求并联系节点
172.13.0.3
172.13.0.6
。我希望节点
172.13.0.2
保存一个暗示的切换,因为第三个节点不可用。但是当我检查
system.hints
表时,它是空的:

cqlsh:imdb> select * from system.hints;

 target_id | hint_id | message_version | mutation
-----------+---------+-----------------+----------

(0 rows)

一致性级别设置为默认值
ONE
。有人能解释一下提示切换的存储位置吗?如果有的话。

最新版本的cassandra没有在
系统中存储提示。提示
表中

提示存储在cassandra 3.0的平面文件中。如果使用大于3.0的cassandra版本,则必须查看在
cassandra.yaml

# Directory where Cassandra should store hints. 
# If not set, the default directory is $CASSANDRA_HOME/data/hints. 
hints_directory: "C:/Program Files/DataStax-DDC/data/hints" 
# How often hints should be flushed from the internal buffers to disk. 
# Will *not* trigger fsync. 
hints_flush_period_in_ms: 10000 
在您的
cassandra.yaml
中检查以上2个值,并在其中查找提示