本文介绍了关于nodetool repair -pr的澄清的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

文档:

可能永远不会有我可以接受所有节点的某些部分数据变慢的时间.但是我想知道:为什么,而 nodetool repair 似乎更聪明:

There is probably never a time where I can accept all nodes to be slow for a certain portion of the data. But I wonder: Why does it do that , when nodetool repair seems to be smarter:

但是,datastax博客解决了这个问题:

However, the datastax blog addresses this issue:

这可能很好,但是实际上,没有用于 nodetool修复 -snapshot 选项(请参见联机帮助页或)(此选项是否已删除?!)

That could be nice, but actually, there is no -snapshot option for nodetool repair (see the manpage, or the documentation) (has this option been removed?!)

总的来说,

    看来,
  • 我不能使用 nodetool repair -pr ,因为我始终至少需要保持系统足够的响应速度以一致性为ONE进行读/写,而不会出现明显的延迟.(注意:我们只有一个数据中心.)还是我缺少/误解了什么?
  • 为什么 nodetool repair 很聪明,可以使一个节点保持响应状态,而 nodetool repair -pr 却会使所有节点的一部分数据变慢?
  • -snapshot 选项在哪里:是否已将其删除,从未实现,或者现在是否可以自动运行,甚至在使用 nodetool repair -pr 时也是如此?
  • I cannot use nodetool repair -pr, it seems, because I always need at least to keep the system responsive enough to read/write with consistency ONE, without significant delay. (Note: We have only one data center.) Or am I missing/misunderstanding something?
  • Why is nodetool repair smart, keeping one node responsive, while nodetool repair -pr makes all nodes slow for a portion of data?
  • Where is the -snapshot option: Has it been removed, never implemented, or does it now maybe automatically work like that, also when using nodetool repair -pr?

推荐答案

以下博客解决了这些问题:

The blog below addresses these issues:

http://www.datastax.com/dev/blog/repair-in-cassandra

简单的 nodetool修复不仅将对节点本身进行修复,而且还将对所有拥有副本的节点(如果其范围在内)进行修复.虽然可以,但它非常昂贵,通常不是您在高峰时段在繁忙的生产系统上执行的操作.

A simple nodetool repair will not only kick off a repair on the node itself but also all the nodes that hold replicas if its ranges. While this is ok, it is very expensive and typically not an operation you'll carry out on a busy production system during peak times.

因此, nodetool repair -pr 将对该节点上的主要范围进行修复.如博客所述,您将需要在集群的每个节点上运行此命令.具有大型生产系统的客户通常会在整个集群中滚动使用它.

Consequently nodetool repair -pr will carry out a repair of the primary ranges on that node. You will need to run this on every node of the cluster as the blog says. Customers with large production systems will typically use this in a rolling fashion across their cluster.

另一方面,Datastax OpsCenter提供了维修服务,该服务的运行规模较小该子范围会一直进行修复,因此尽管您总是在较低资源级别下始终在后台对其进行修复.

On another note Datastax OpsCenter offers the repair service which runs smaller sub-range repairs all the time so although you're always repairing its going on in the background all the time at a lower resource level.

对于快照,运行常规修复将按照您所说的那样调用快照,您也可以使用 nodetool snapshot

As for the snapshots, running a regular repair will invoke a snapshot as you stated, you can also invoke a snapshot yourself using nodetool snapshot

希望这会有所帮助!

这篇关于关于nodetool repair -pr的澄清的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-10 00:11