You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Roshan <co...@gmail.com> on 2012/02/09 04:04:37 UTC
Cassandra 1.0.6 multi data center question
Hi All
I have 2 Cassandra data center (DC1=>1 node, DC2=>2 nodes).
XXX.XXX.XXX.XXX DC2 RAC1 Up Normal 44.3 KB
33.33% 0
YYY.YYY.YY.YYY DC1 RAC1 Up Normal 48.71 KB
33.33% 56713727820156407428984779325531226112
ZZ.ZZZ.ZZZ.ZZ DC2 RAC1 Up Normal 48.69 KB
33.33% 113427455640312814857969558651062452224
My requirement is want to create a keyspace and want to replicate within
only DC1. So that keyspace is not visible to the DC2. I have create a
keyspave like this:
CREATE KEYSPACE WCSDC WITH placement_strategy = 'NetworkTopologyStrategy'
AND strategy_options={DC1:1};
But when I create the above keyspace from DC1 using cassandra-cli, the
schema is updated all over the cluster and keyspave is created on DC2 as
well.
Could someone please help me to solve this issue. Thanks.
--
View this message in context: http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Cassandra-1-0-6-multi-data-center-question-tp7268026p7268026.html
Sent from the cassandra-user@incubator.apache.org mailing list archive at Nabble.com.
Re: Cassandra 1.0.6 multi data center question
Posted by Roshan <co...@gmail.com>.
Thanks for your explanation. It works as you said.
--
View this message in context: http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Cassandra-1-0-6-multi-data-center-question-tp7268026p7271287.html
Sent from the cassandra-user@incubator.apache.org mailing list archive at Nabble.com.
Re: Cassandra 1.0.6 multi data center question
Posted by Jeremiah Jordan <je...@morningstar.com>.
No, not an issue. The nodes in DC2 know that they aren't supposed to
have data, so they go ask the nodes in DC1 for the data to return to you.
-Jeremiah
On 02/09/2012 05:28 AM, Roshan Pradeep wrote:
> Thanks Peter for the replies.
>
> Previously it was a typing mistake and it should be "getting". I
> checked the DC2 (with having replica 0) and noticed that there is no
> SSTables created.
>
> I use java hector sample program to insert data to the keyspace. After
> I insert a data item, I
> 1) Login to one of node in DC having replica count 0 using cassanda-cli.
> 2) Use the keyspace and list the column family.
> 3) I can see the data item inserted from DC having replica count >1.
>
> Is this a issue? Please clarify. Thanks again.
>
>
> On Thu, Feb 9, 2012 at 6:00 PM, Peter Schuller
> <peter.schuller@infidyne.com <ma...@infidyne.com>> wrote:
>
> Again the *schema* gets propagated and the keyspace will exist
> everywhere. You should just have exactly zero amount of data for the
> keyspace in the DC w/o replicas.
>
>
> --
> / Peter Schuller (@scode, http://worldmodscode.wordpress.com)
>
>
Re: Cassandra 1.0.6 multi data center question
Posted by Roshan Pradeep <co...@gmail.com>.
Thanks Peter for the replies.
Previously it was a typing mistake and it should be "getting". I checked
the DC2 (with having replica 0) and noticed that there is no SSTables
created.
I use java hector sample program to insert data to the keyspace. After I
insert a data item, I
1) Login to one of node in DC having replica count 0 using cassanda-cli.
2) Use the keyspace and list the column family.
3) I can see the data item inserted from DC having replica count >1.
Is this a issue? Please clarify. Thanks again.
On Thu, Feb 9, 2012 at 6:00 PM, Peter Schuller
<pe...@infidyne.com>wrote:
> Again the *schema* gets propagated and the keyspace will exist
> everywhere. You should just have exactly zero amount of data for the
> keyspace in the DC w/o replicas.
>
>
> --
> / Peter Schuller (@scode, http://worldmodscode.wordpress.com)
>
Re: Cassandra 1.0.6 multi data center question
Posted by Peter Schuller <pe...@infidyne.com>.
Again the *schema* gets propagated and the keyspace will exist
everywhere. You should just have exactly zero amount of data for the
keyspace in the DC w/o replicas.
--
/ Peter Schuller (@scode, http://worldmodscode.wordpress.com)
Re: Cassandra 1.0.6 multi data center question
Posted by Peter Schuller <pe...@infidyne.com>.
> Thanks for the reply. But I can see the data setting inserted in DC1 in DC2.
> So that means data also getting replicated to DC2.
"data setting inserted"?
You should not be seeing data in the DC with 0 replicas. What does
"data setting inserted" mean?
Do you have sstables on disk with data for the keyspace?
--
/ Peter Schuller (@scode, http://worldmodscode.wordpress.com)
Re: Cassandra 1.0.6 multi data center question
Posted by Roshan <co...@gmail.com>.
Thanks for the reply. But I can see the data setting inserted in DC1 in DC2.
So that means data also getting replicated to DC2.
Want to know how to restrict this?
--
View this message in context: http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Cassandra-1-0-6-multi-data-center-question-tp7268026p7268185.html
Sent from the cassandra-user@incubator.apache.org mailing list archive at Nabble.com.
Re: Cassandra 1.0.6 multi data center question
Posted by Peter Schuller <pe...@infidyne.com>.
It is expected that the schema is replicated everywhere, but *data*
won't be in the DC with 0 replicas.
--
/ Peter Schuller (@scode, http://worldmodscode.wordpress.com)
Re: Cassandra 1.0.6 multi data center question
Posted by Roshan <co...@gmail.com>.
I have create the Keyspace like below, but the result is same. All the data
getting replicated to all over the cluster instead of DC1.
create keyspace WSDC
with placement_strategy =
'org.apache.cassandra.locator.NetworkTopologyStrategy' and strategy_options
= {DC1:1,DC2:0};
--
View this message in context: http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Cassandra-1-0-6-multi-data-center-question-tp7268026p7268138.html
Sent from the cassandra-user@incubator.apache.org mailing list archive at Nabble.com.