You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by ma...@gmail.com on 2009/12/16 08:20:14 UTC

tool to locate all replica of one key

Hello guys:
I have some stupid question to ask...

1. Does anyone know how to locate all replica(on which node) of one key (for monitor purpose)? Or any API can use?
2. If one node down, can cassandra re-replicate missing rows automatically? Or any utils can do it on demand?
2. If one node added, can cassandra re-balance automatically? Or any utils can do it on demand?

Thanks very much!!

---------END----------




RE: tool to locate all replica of one key

Posted by ma...@gmail.com.
Thank you Jonathan!!

---------END----------


-----Original Message-----
From: Jonathan Ellis [mailto:jbellis@gmail.com] 
Sent: Wednesday, December 16, 2009 11:05 PM
To: cassandra-user@incubator.apache.org
Subject: Re: tool to locate all replica of one key

On Wed, Dec 16, 2009 at 1:20 AM,  <ma...@gmail.com> wrote:
> 1. Does anyone know how to locate all replica(on which node) of one key
(for monitor purpose)? Or any API can use?

StorageService.getNaturalEndpoints(StorageService.getPartitioner().getToken(
key))

will do that, but it's not exposed via a tool yet.

> 2. If one node down, can cassandra re-replicate missing rows
automatically? Or any utils can do it on demand?

Cassandra assumes that a node that is down will be brought back up,
unless you use "nodeprobe removetoken" to tell it the node is gone for
good.  If you do that, it will re-replicate data.

> 2. If one node added, can cassandra re-balance automatically? Or any utils
can do it on demand?

Yes.  See http://wiki.apache.org/cassandra/Operations, specifically
the Bootstrap section, but you should read the parts before that too
for background.


Re: tool to locate all replica of one key

Posted by Jonathan Ellis <jb...@gmail.com>.
On Wed, Dec 16, 2009 at 1:20 AM,  <ma...@gmail.com> wrote:
> 1. Does anyone know how to locate all replica(on which node) of one key (for monitor purpose)? Or any API can use?

StorageService.getNaturalEndpoints(StorageService.getPartitioner().getToken(key))

will do that, but it's not exposed via a tool yet.

> 2. If one node down, can cassandra re-replicate missing rows automatically? Or any utils can do it on demand?

Cassandra assumes that a node that is down will be brought back up,
unless you use "nodeprobe removetoken" to tell it the node is gone for
good.  If you do that, it will re-replicate data.

> 2. If one node added, can cassandra re-balance automatically? Or any utils can do it on demand?

Yes.  See http://wiki.apache.org/cassandra/Operations, specifically
the Bootstrap section, but you should read the parts before that too
for background.

Re: tool to locate all replica of one key

Posted by 孔令华 <ko...@gmail.com>.
Hi all,

I have the similar question.

After killing one of the node of the cluster, I find that only the node's
status changed: from "Up" to "Down". But all the data of the node left
unchanged according to the "Load" field of the nodeprobe's output info.

According to the Dynamo paper, when a node failed,  its neighbors should
change their data topology and ensure the number of replicas. How does
Cassandra ensure that?

2009/12/16 <ma...@gmail.com>

> Hello guys:
> I have some stupid question to ask...
>
> 1. Does anyone know how to locate all replica(on which node) of one key
> (for monitor purpose)? Or any API can use?
> 2. If one node down, can cassandra re-replicate missing rows automatically?
> Or any utils can do it on demand?
> 2. If one node added, can cassandra re-balance automatically? Or any utils
> can do it on demand?
>
> Thanks very much!!
>
> ---------END----------
>
>
>
>