It was a typo in the first test, it should be
/repair -h 127.0.0.1 -p 7100 repair -pr -hosts 127.0.0.2 127.0.0.3
/and not
/repair -h 127.0.0.1 -p 7100 repair -pr 127.0.0.2 127.0.0.3/
/
/BR
Marcus Olsson
On 09/04/2015 02:50 PM, Marcus Olsson wrote:
Hi,
While checking the repair documentation at
http://docs.datastax.com/en/cassandra/2.1/cassandra/tools/toolsRepair.html
I noticed the line***Use the **-hosts**option to list the good nodes
to use for repairing the bad nodes. Use **-h**to name the bad nodes.*
and below there was an example:
*/nodetool repair -pr -hosts
/**/10.2/**/./**/2.20/**//**/10.2/**/./**/2.21/* which should do */A
partitioner range repair of the bad partition on current node using
the good partitions on 10.2.2.20 or 10.2.2.21/* according to the
documentation.
Is this correctly documented because I don't seem to be getting the
right results when trying.
I started up a C* 2.1.9 CCM cluster and when running
/
repair -h 127.0.0.1 -p 7100 repair -pr 127.0.0.2 127.0.0.3/
I get the error:
*nodetool: Keyspace [127.0.0.3] does not exist.*
---------------
When I run it as
/
nodetool -h 127.0.0.1 -p 7100 repair -pr -hosts 127.0.0.2/
instead it gives me the error:
*java.lang.RuntimeException: Primary range repair should be performed
on all nodes in the cluster.**
** at
org.apache.cassandra.tools.NodeTool$Repair.execute(NodeTool.java:1873)**
** at
org.apache.cassandra.tools.NodeTool$NodeToolCmd.run(NodeTool.java:288)**
** at org.apache.cassandra.tools.NodeTool.main(NodeTool.java:202)*
---------------
I even tried running it as
/
repair -h 127.0.0.1 -p 7100 repair -hosts 127.0.0.2
/
and then I get*
**The current host must be part of the repair*
---------------
This seems like either bug(s) or a documentation mistake?
There is also a line in
http://docs.datastax.com/en/cassandra/2.1/cassandra/operations/ops_repair_nodes_c.html
which says that *You can specify which nodes have the good data for
replacing the outdated data.* which seems to be related(and also the
reason I tried it out)?
BR
Marcus Olsson