Cassandra nodetool repair中的PR选项

Cassandra nodetool repair中的pr选项的官方解释是

Use -pr to repair only the first range returned by the partitioner.


cassandra的数据可以有多份复制,比如说A,B,C,D四个节点,keyspace的replication factor为2


A节点上有range (D,A)的primary数据,同时也有range(C,D)的replica数据。如果在A节点上跑

nodetool repair -pr 那么会在A节点和B节点上同步range (D,A)的数据

如果是跑 nodetool repair 不加pr选项,那么会在
1. A节点和B节点上同步range (D,A)的数据
2. A节点和D节点上同步range (C,D)的数据

所以,如果你是为了处理delete的问题进行的日常的repair,可以使用-pr选项,在每个节点上跑一次。如果不加pr选项在每个节点上跑一次的话,会多做了重复的工作。再比如说增大replication factor,也可以使用-pr选项,在每个节点上跑。

如果是某个节点做recover操作的话,应该在该节点上不加pr选项,这样不单是同步了master的数据段,同样也同步了replica的数据段。如果是某个节点down掉,nodetool rebuild应该更快

另外,如果是多个data center, NetworkTopologyStrategy,可以加-local选项加快repair的速度
Use -local to only repair against nodes in the same data center.

About Eagle Fan

oracle dba
This entry was posted in nosql. Bookmark the permalink.

14 Responses to Cassandra nodetool repair中的PR选项

  1. These Happy New Year 2016 Wishes Cards will
    aid you to send wishes to your friends, mother, father or loved ones members.

  2. ???? says:

    焕彩发丝之高明护发   你有什么样的头发?要有一头惹人艳羡的秀发,除了去理发店,自己平日的精心护理更是必不可少。因此,你要认清&#3

  3. Tengo cumplido aquellas personas que no a percieve aeronaves anterior sin experimentar una reacción instintiva que les envió en pos de ubicación ocultar,Chaqueta Moncler Mujeres.Hoy en el conectividad además del totalmente nuevo estilo de vida ​​que internet características para todos nosotros,, a Texas Holdem jugador del asimiento puede mejorar su habilidad Diario por solo ir en línea y practicando. Entendemos aprecian nada en la vida cotidiana prá

  4. ????? says:

    机,1035压瓦机,1050压型机,1080压瓦机,卷帘门机,312屋脊瓦机,688楼承板机,角驰475,天槽地沟机,汽车箱 192护栏板成型机 当前位置 HT高速护栏板机系列 192护栏板成型机 &#19968

  5. 900??? says:

    选购压瓦机网址   沧州金辉压瓦机械设备厂   压瓦机|琉璃瓦机|彩钢瓦设备|三层压瓦机|C型钢机|复合板机_泊头华茂数控彩钢设备制造厂 手 机:1383

  6. thank you information seems overwhelming perfectly pent content very neat post much thanks

  7. ????? says:

    沧州金辉压瓦机械设备厂   电 话:0317-8086188   电 话:0317-8086199   手 机:13832771638  15133711101   Q    Q:59458991 &nbsp,卷帘门机;     49870222   联系人:王经理   邮 箱:59458991@qq

  8. ?????? says:

    压型钢板型号 51-420-840 用途 有效覆盖宽度(mm) 840 展开宽度(mm) 1000 隐藏式屋面板 板厚(mm) 0,金利止水板批发.4-1.0 截面惯性距(cm4 m) 420     840角驰成型机采用台湾台达DVP14ES主&#26426

  9. ????????? says:

    Q Q:59458991 49870222   电 话:0317-8086188   联系人:王经理   地  址:沧州市开发区 地 址:沧州市开发区 手 机:13832771638  15133711101       当前位置 联系方式 压瓦机厂,压&#2

  10. ??? ?? says:

    亚洲与欧洲有着判然不同的经历:欧洲阅历了两次世界大战,而亚洲只履历过一次,长春那个痤疮医院最好。两次世界大战给欧洲形成巨大破 坏,&

  11. ??????????? says:

    秦中利财富案与凌河区法院的五个裁定 秦中利财产案与凌河区法院的五个裁定sina2016-7-19 11:12特约记者 陈涛6月3日,本报编纂部收到一份投诉和相干证据&#324

  12. ?One (doughnut, piece of cheesecake, bag of chips) won?t hurt!? We hear this time and time again. Purchasing it within a retail outlet is much less gentle as a single includes in direction of commitment in the direction of the retail store, stand within just the queue and then provide the content house to acquire the Cheap NFL Jerseys most up-to-date working Norton coupons. Those programs can often be noticed through inquiring the ponder “Is that much too Terrific in direction of Wholesale NFL

  13. Pittsburgh could possibly make a deal with Oakland that would net them outfielder Josh Willingham and reliever Craig Breslow.
    Henry wasn’t accompanied by fellow owners Tom Werner and Larry Lucchino and departed from custom by meeting with the Boston media.   Use the Papa johns coupons to order the tasty pizza food » StrongPedia Article Directory – Free article directory. down the road, 50’s users across the country subscribe to these kinds of boot styles after savoring adve

  14. It is an added expenditure you’ve got to bear since there is not it will save you this fee. But you helps save it,Zapatillas Puma Hombre Barato, in cases where the buyer promises making fee suitable for you. An expert are going to pay the expense and also in by using this method add without all hassles and apprehensions linked with selling home.;-Discover market potential in several regional markets;-Find out how Chinese animation-cartoon market change and the way your business is anxious in;-Ke

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>