You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by "raoyixuan (Shandy)" <ra...@huawei.com> on 2011/01/12 02:16:45 UTC

about the insert data

I get confuse about the node which the data insert.I connect to one node by Cassandra-cli, and insert some data ,whether this node is the coordinate node? As I know, if I set the random partitioner, the coordinate node is whose the hash value bigger than the key’s hash value


华为技术有限公司 Huawei Technologies Co., Ltd.[Company_logo]




Phone: 28358610
Mobile: 13425182943
Email: raoyixuan@huawei.com<ma...@huawei.com>
地址:深圳市龙岗区坂田华为基地 邮编:518129
Huawei Technologies Co., Ltd.
Bantian, Longgang District,Shenzhen 518129, P.R.China
http://www.huawei.com
________________________________
本邮件及其附件含有华为公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁
止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中
的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件!
This e-mail and its attachments contain confidential information from HUAWEI, which
is intended only for the person or entity whose address is listed above. Any use of the
information contained herein in any way (including, but not limited to, total or partial
disclosure, reproduction, or dissemination) by persons other than the intended
recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by
phone or email immediately and delete it!


RE: about the insert data

Posted by "raoyixuan (Shandy)" <ra...@huawei.com>.
Thanks , I totally get it.

From: Tyler Hobbs [mailto:tyler@riptano.com]
Sent: Thursday, January 13, 2011 2:19 PM
To: user@cassandra.apache.org
Subject: Re: about the insert data

The coordinator node routes the request in parallel to all of the replicas and waits for responses.  One of those replicas might happen to be the coordinator itself.

Only replicas read/write data they are responsible for, not the coordinator (unless the coordinator is also a replica for that data).

- Tyler
On Thu, Jan 13, 2011 at 12:07 AM, raoyixuan (Shandy) <ra...@huawei.com>> wrote:
I mean whether both the coordinate node and the replica node keep the insert data. Or just the replica node keep the insert data. And the coordinate node just route the insert data to the replica. Can you get me?

-----Original Message-----
From: Jonathan Ellis [mailto:jbellis@gmail.com<ma...@gmail.com>]
Sent: Thursday, January 13, 2011 1:56 PM
To: user
Subject: Re: about the insert data
On Wed, Jan 12, 2011 at 5:46 PM, raoyixuan (Shandy)
<ra...@huawei.com>> wrote:
> So you mean the coordinator node is just responsible for routing the request.

Right.  Of course, if the coordinator node happens to also be a
replica, it can be a little more efficient by performing that
operation directly rather than going over a socket.

> where the request will be Routed? whether the coordinator node route the request to the first replica to insert the data?

I don't understand the question.

--
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com


Re: about the insert data

Posted by Tyler Hobbs <ty...@riptano.com>.
The coordinator node routes the request in parallel to all of the replicas
and waits for responses.  One of those replicas might happen to be the
coordinator itself.

Only replicas read/write data they are responsible for, not the coordinator
(unless the coordinator is also a replica for that data).

- Tyler

On Thu, Jan 13, 2011 at 12:07 AM, raoyixuan (Shandy)
<ra...@huawei.com>wrote:

> I mean whether both the coordinate node and the replica node keep the
> insert data. Or just the replica node keep the insert data. And the
> coordinate node just route the insert data to the replica. Can you get me?
>
> -----Original Message-----
> From: Jonathan Ellis [mailto:jbellis@gmail.com]
> Sent: Thursday, January 13, 2011 1:56 PM
> To: user
> Subject: Re: about the insert data
>
> On Wed, Jan 12, 2011 at 5:46 PM, raoyixuan (Shandy)
> <ra...@huawei.com> wrote:
> > So you mean the coordinator node is just responsible for routing the
> request.
>
> Right.  Of course, if the coordinator node happens to also be a
> replica, it can be a little more efficient by performing that
> operation directly rather than going over a socket.
>
> > where the request will be Routed? whether the coordinator node route the
> request to the first replica to insert the data?
>
> I don't understand the question.
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of Riptano, the source for professional Cassandra support
> http://riptano.com
>

RE: about the insert data

Posted by "raoyixuan (Shandy)" <ra...@huawei.com>.
I mean whether both the coordinate node and the replica node keep the insert data. Or just the replica node keep the insert data. And the coordinate node just route the insert data to the replica. Can you get me?

-----Original Message-----
From: Jonathan Ellis [mailto:jbellis@gmail.com] 
Sent: Thursday, January 13, 2011 1:56 PM
To: user
Subject: Re: about the insert data

On Wed, Jan 12, 2011 at 5:46 PM, raoyixuan (Shandy)
<ra...@huawei.com> wrote:
> So you mean the coordinator node is just responsible for routing the request.

Right.  Of course, if the coordinator node happens to also be a
replica, it can be a little more efficient by performing that
operation directly rather than going over a socket.

> where the request will be Routed? whether the coordinator node route the request to the first replica to insert the data?

I don't understand the question.

-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com

Re: about the insert data

Posted by Jonathan Ellis <jb...@gmail.com>.
On Wed, Jan 12, 2011 at 5:46 PM, raoyixuan (Shandy)
<ra...@huawei.com> wrote:
> So you mean the coordinator node is just responsible for routing the request.

Right.  Of course, if the coordinator node happens to also be a
replica, it can be a little more efficient by performing that
operation directly rather than going over a socket.

> where the request will be Routed? whether the coordinator node route the request to the first replica to insert the data?

I don't understand the question.

-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com

RE: about the insert data

Posted by "raoyixuan (Shandy)" <ra...@huawei.com>.
So you mean the coordinator node is just responsible for routing the request. where the request will be Routed? whether the coordinator node route the request to the first replica to insert the data?

whether 

-----Original Message-----
From: scode@scode.org [mailto:scode@scode.org] On Behalf Of Peter Schuller
Sent: Thursday, January 13, 2011 2:02 AM
To: user@cassandra.apache.org
Subject: Re: about the insert data

> Firstly, the data will be inserted by the coordinate node.
>
> Secondly, it will find the first replica node based by the partitioner ,such randompartitioner,
>
> Thirdly, it will replicate the data based by the replica factor

Replicate placement is entirely independent of which node you talk to.
The one talk to, the co-ordinator node, is responsible for routing the
requests appropriately. The replication strategy decides where data
lives.

As a client, you don't have to worry about which node you're talking
to except for spreading the load out over nodes in some fashion.

--
/ Peter Schuller

Re: about the insert data

Posted by Peter Schuller <pe...@infidyne.com>.
> Firstly, the data will be inserted by the coordinate node.
>
> Secondly, it will find the first replica node based by the partitioner ,such randompartitioner,
>
> Thirdly, it will replicate the data based by the replica factor

Replicate placement is entirely independent of which node you talk to.
The one talk to, the co-ordinator node, is responsible for routing the
requests appropriately. The replication strategy decides where data
lives.

As a client, you don't have to worry about which node you're talking
to except for spreading the load out over nodes in some fashion.

--
/ Peter Schuller

RE: about the insert data

Posted by "raoyixuan (Shandy)" <ra...@huawei.com>.
Thanks tyler

So the node I connect to Is the coordinate node. right?

But what’s the process about the replica?

Firstly, the data will be inserted by the coordinate node.
Secondly, it will find the first replica node based by the partitioner ,such randompartitioner,
Thirdly, it will replicate the data based by the replica factor

Any thing wrong?



From: Tyler Hobbs [mailto:tyler@riptano.com]
Sent: Wednesday, January 12, 2011 9:47 AM
To: user@cassandra.apache.org
Subject: Re: about the insert data

The "coordinator node" (as it is referred to in the documentation) is the node which you connect to and make the request to.  It has nothing to do with which node(s) are replicas for the data.

- Tyler
2011/1/11 raoyixuan (Shandy) <ra...@huawei.com>>
I get confuse about the node which the data insert.I connect to one node by Cassandra-cli, and insert some data ,whether this node is the coordinate node? As I know, if I set the random partitioner, the coordinate node is whose the hash value bigger than the key’s hash value


华为技术有限公司 Huawei Technologies Co., Ltd.[Company_logo]



Phone: 28358610
Mobile: 13425182943
Email: raoyixuan@huawei.com<ma...@huawei.com>
地址:深圳市龙岗区坂田华为基地 邮编:518129
Huawei Technologies Co., Ltd.
Bantian, Longgang District,Shenzhen 518129, P.R.China
http://www.huawei.com
________________________________
本邮件及其附件含有华为公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁
止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中
的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件!
This e-mail and its attachments contain confidential information from HUAWEI, which
is intended only for the person or entity whose address is listed above. Any use of the
information contained herein in any way (including, but not limited to, total or partial
disclosure, reproduction, or dissemination) by persons other than the intended
recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by
phone or email immediately and delete it!



Re: about the insert data

Posted by Tyler Hobbs <ty...@riptano.com>.
The "coordinator node" (as it is referred to in the documentation) is the
node which you connect to and make the request to.  It has nothing to do
with which node(s) are replicas for the data.

- Tyler

2011/1/11 raoyixuan (Shandy) <ra...@huawei.com>

>  I get confuse about the node which the data insert.I connect to one node
> by Cassandra-cli, and insert some data ,whether this node is the coordinate
> node? As I know, if I set the random partitioner, the coordinate node is
> whose the hash value bigger than the key’s hash value
>
>
>
>
>
> 华为技术有限公司 Huawei Technologies Co., Ltd.[image: Company_logo]
>
>
>
>
>
>
>
> Phone: 28358610
> Mobile: 13425182943
> Email: raoyixuan@huawei.com
> 地址:深圳市龙岗区坂田华为基地 邮编:518129
> Huawei Technologies Co., Ltd.
> Bantian, Longgang District,Shenzhen 518129, P.R.China
> http://www.huawei.com
>  ------------------------------
>
> 本邮件及其附件含有华为公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁
> 止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中
> 的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件!
> This e-mail and its attachments contain confidential information from
> HUAWEI, which
> is intended only for the person or entity whose address is listed above.
> Any use of the
> information contained herein in any way (including, but not limited to,
> total or partial
> disclosure, reproduction, or dissemination) by persons other than the
> intended
> recipient(s) is prohibited. If you receive this e-mail in error, please
> notify the sender by
> phone or email immediately and delete it!
>
>
>