Re: FW: Two node cassandra cluster doubts

2015-11-02 Thread ICHIBA Sara
I think that this is a normal behaviour as you shut down your seed and then
reboot it. You should know that when you start a seed node it doesn't do
the bootstrapping thing. Which means it doesn't look if there are changes
in the contents of the tables. In here in your tests, you shut down node A
before doing the inserts and started it after. So you node A doesn't have
the new rows you inserted. And yes it is normal to have  different values
of your query each time. Because the coordinator node changes and therfore
the query is executed each time on a different node ( when  node B answers
you've got 15 rows and WHE  node A does you have 10 rows)
Le 2 nov. 2015 19:22, "Luis Miguel"  a écrit :

> Hello!
>
> I have set a cassandra cluster with two nodes, Node A  and Node B --> RF=2,
> Read CL=1 and Write CL = 1;
>
> Node A is seed...
>
>
> At first everything is working well, when I add/delete/update entries on
> Node A, everything is replicated on Node B and vice-versa, even if I shut
> down node A, and I made new insertions on Node B meanwhile, and After that
> I start up node A again Cassandra recovers OKBUT there is ONE case when
> this situation fails I am going to describe the process:
>
> Node A and Node B are sync.
>
> Select Count (*) From MYTABLE;---> 10 rows
>
> Shut down Node A.
>
> Made some inserts on Node B.
>
> Select Count (*) From MYTABLE;---> 15 rows
>
> Shut down Node B.
>
> Start Up Node B.
>
> Select Count (*) From MYTABLE;---> 15 rows
>
> (Everything Ok, yet).
>
> Start Up Node A.
>
> Select Count (*) From MYTABLE;---> 10 rows (uhmmm...this is weird...check
> it again)
> Select Count (*) From MYTABLE;---> 15 rows  (wow!..this is correct, lets
> try again)
> Select Count (*) From MYTABLE;---> 10 rows (Ok...values are dancing)
>
> If I made the same queries on NODE B it Behaves the same way and it
> only is solved with a nodetool repair...but I would prefer an automatic
> fail-over...
>
> is there any way to avoid this??? or a nodetool repair execution is
> mandatory???
>
> Thanks in advance!!!
>


cassandra scalability

2015-09-07 Thread ICHIBA Sara
hey there,

i'm trying to scale casandra cluster with openstack. But i'm seeing strange
behavior when there is a scaleup (new node is added) scaledown (one node is
removed). (don't worry the seeds are stable).

I start my cluster with 2 machines, one seed and one server, then create
the database with RF=2.

when there is a scaleup action, an other node is added to the cluster.
when i query table x which has 100 row, i have different results. let's say
that when i query from seed i can see the whole table, and when i query
from server A i can see 30 row.

any idea why i have this ? is it a normal behaviour in cassandra?

thx,
sara


Re: cassandra scalability

2015-09-07 Thread ICHIBA Sara
at the biginning it looks like this:

[root@demo-server-seed-k6g62qr57nok ~]# nodetool status
Datacenter: DC1
===
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address Load   Tokens  OwnsHost
ID   Rack
UN  40.0.0.208  128.73 KB  248 ?
6e7788f9-56bf-4314-a23a-3bf1642d0606  RAC1
UN  40.0.0.209  114.59 KB  249 ?
84f6f0be-6633-4c36-b341-b968ff91a58f  RAC1
UN  40.0.0.205  129.53 KB  245 ?
aa233dc2-a8ae-4c00-af74-0a119825237f  RAC1




[root@demo-server-seed-k6g62qr57nok ~]# nodetool status service_dictionary
Datacenter: DC1
===
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address Load   Tokens  Owns (effective)  Host
ID   Rack
UN  40.0.0.208  128.73 KB  248 68.8%
6e7788f9-56bf-4314-a23a-3bf1642d0606  RAC1
UN  40.0.0.209  114.59 KB  249 67.8%
84f6f0be-6633-4c36-b341-b968ff91a58f  RAC1
UN  40.0.0.205  129.53 KB  245 63.5%
aa233dc2-a8ae-4c00-af74-0a119825237f  RAC1


the result of the query select * from service_dictionary.table1; gave me
 70 rows from 40.0.0.205
64 from 40.0.0.209
54 from 40.0.0.208

2015-09-07 11:13 GMT+02:00 Edouard COLE :

> Could you provide the result of :
> - nodetool status
> - nodetool status YOURKEYSPACE
>
>


Re: cassandra scalability

2015-09-07 Thread ICHIBA Sara
when there's a scaledown action, i make sure to decommission the node
before. but still, I don't understand why I'm having this behaviour. is it
normal. what do you do normally to remove a node? is it related to tokens?
i'm affecting to each of my node a different token based on there ip
address (the token is A+B+C+D and the ip is A.B.C.D)

2015-09-07 11:28 GMT+02:00 ICHIBA Sara <ichi.s...@gmail.com>:

> at the biginning it looks like this:
>
> [root@demo-server-seed-k6g62qr57nok ~]# nodetool status
> Datacenter: DC1
> ===
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  Address Load   Tokens  OwnsHost
> ID   Rack
> UN  40.0.0.208  128.73 KB  248 ?
> 6e7788f9-56bf-4314-a23a-3bf1642d0606  RAC1
> UN  40.0.0.209  114.59 KB  249 ?
> 84f6f0be-6633-4c36-b341-b968ff91a58f  RAC1
> UN  40.0.0.205  129.53 KB  245 ?
> aa233dc2-a8ae-4c00-af74-0a119825237f  RAC1
>
>
>
>
> [root@demo-server-seed-k6g62qr57nok ~]# nodetool status service_dictionary
> Datacenter: DC1
> ===
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  Address Load   Tokens  Owns (effective)  Host
> ID   Rack
> UN  40.0.0.208  128.73 KB  248 68.8%
> 6e7788f9-56bf-4314-a23a-3bf1642d0606  RAC1
> UN  40.0.0.209  114.59 KB  249 67.8%
> 84f6f0be-6633-4c36-b341-b968ff91a58f  RAC1
> UN  40.0.0.205  129.53 KB  245 63.5%
> aa233dc2-a8ae-4c00-af74-0a119825237f  RAC1
>
>
> the result of the query select * from service_dictionary.table1; gave me
>  70 rows from 40.0.0.205
> 64 from 40.0.0.209
> 54 from 40.0.0.208
>
> 2015-09-07 11:13 GMT+02:00 Edouard COLE <edouard.c...@rgsystem.com>:
>
>> Could you provide the result of :
>> - nodetool status
>> - nodetool status YOURKEYSPACE
>>
>>
>


Re: cassandra scalability

2015-09-07 Thread ICHIBA Sara
like how you load data, what scaleup /
>> scaledown are and precise if you let it decommission fully (streams
>> finished, node removed from nodetool status) etc ?
>>
>> This would help us to help you :).
>>
>> Also, what happens if you query using "CONSISTENCY LOCAL_QUORUM;" (or
>> ALL) before your select ? If not using cqlsh, set the Consistency Level of
>> your client to LOCAL_QUORUM or ALL and try to select again.
>>
>> Also, I am not sure of the meaning of this --> " i'm affecting to each
>> of my node a different token based on there ip address (the token is
>> A+B+C+D and the ip is A.B.C.D)". Aren't you using RandomPartitioner or
>> Murmur3Partitioner ?
>>
>> C*heers,
>>
>> Alain
>>
>>
>>
>> 2015-09-07 12:01 GMT+02:00 Edouard COLE <edouard.c...@rgsystem.com>:
>>
>>> Please, don't mail me directly
>>>
>>> I read your answer, but I cannot help anymore
>>>
>>> And answering with "Sorry, I can't help" is pointless :)
>>>
>>> Wait for the community to answer
>>>
>>> De : ICHIBA Sara [mailto:ichi.s...@gmail.com]
>>> Envoyé : Monday, September 07, 2015 11:34 AM
>>> À : user@cassandra.apache.org
>>> Objet : Re: cassandra scalability
>>>
>>> when there's a scaledown action, i make sure to decommission the node
>>> before. but still, I don't understand why I'm having this behaviour. is it
>>> normal. what do you do normally to remove a node? is it related to tokens?
>>> i'm affecting to each of my node a different token based on there ip
>>> address (the token is A+B+C+D and the ip is A.B.C.D)
>>>
>>> 2015-09-07 11:28 GMT+02:00 ICHIBA Sara <ichi.s...@gmail.com>:
>>> at the biginning it looks like this:
>>>
>>> [root@demo-server-seed-k6g62qr57nok ~]# nodetool status
>>> Datacenter: DC1
>>> ===
>>> Status=Up/Down
>>> |/ State=Normal/Leaving/Joining/Moving
>>> --  Address Load   Tokens  OwnsHost
>>> ID   Rack
>>> UN  40.0.0.208  128.73 KB  248 ?
>>> 6e7788f9-56bf-4314-a23a-3bf1642d0606  RAC1
>>> UN  40.0.0.209  114.59 KB  249 ?
>>> 84f6f0be-6633-4c36-b341-b968ff91a58f  RAC1
>>> UN  40.0.0.205  129.53 KB  245 ?
>>> aa233dc2-a8ae-4c00-af74-0a119825237f  RAC1
>>>
>>>
>>>
>>>
>>> [root@demo-server-seed-k6g62qr57nok ~]# nodetool status
>>> service_dictionary
>>> Datacenter: DC1
>>> ===
>>> Status=Up/Down
>>> |/ State=Normal/Leaving/Joining/Moving
>>> --  Address Load   Tokens  Owns (effective)  Host
>>> ID   Rack
>>> UN  40.0.0.208  128.73 KB  248 68.8%
>>> 6e7788f9-56bf-4314-a23a-3bf1642d0606  RAC1
>>> UN  40.0.0.209  114.59 KB  249 67.8%
>>> 84f6f0be-6633-4c36-b341-b968ff91a58f  RAC1
>>> UN  40.0.0.205  129.53 KB  245 63.5%
>>> aa233dc2-a8ae-4c00-af74-0a119825237f  RAC1
>>>
>>> the result of the query select * from service_dictionary.table1; gave me
>>>  70 rows from 40.0.0.205
>>> 64 from 40.0.0.209
>>> 54 from 40.0.0.208
>>>
>>> 2015-09-07 11:13 GMT+02:00 Edouard COLE <edouard.c...@rgsystem.com>:
>>> Could you provide the result of :
>>> - nodetool status
>>> - nodetool status YOURKEYSPACE
>>>
>>>
>>>
>> --
> Regards,
>
> Ryan Svihla


Re: cassandra scalability

2015-09-07 Thread ICHIBA Sara
I think I know where my problem is coming from. I took a look at the log of
cassandra on each node and I saw something related to bootstrap. it says
that the node is a seed so there will be no bootstraping. Actually I made a
mistake. in the cassandra.yaml file each node have two ips as seeds. the ip
of the machine itself and the ip of the real seed server. Once i removed
the local IP the problem seems to be fixed.

2015-09-07 18:01 GMT+02:00 ICHIBA Sara <ichi.s...@gmail.com>:

> Thank you all for your answers.
>
> @Alain:
> Can you detail actions performed,
> >>like how you load data
> >>>i have a haproxy in front of my cassandra database, so i'm sure that my
> application queries each time a different coordinator
>
> >>what scaleup / scaledown are and precise if you let it decommission
> fully (streams finished, node removed from nodetool status)
> >>> i'm using openstack platform to autoscale cassandra cluster. Actually,
> in openstack, the combination of ceilometer + heat allow to users to
> automate the deployment of their applications and supervise their
> resources. they can order the scale up (adding of new nodes automatically)
> when resources(cpu, ram,...) are needed or scaledown (remove unecessary VMs
> automatically).
> so with heat i can spawn automatically a cluster of 2 cassandra VMs
> (create the cluster and configure each cassandra server with a template).
> My cluster can go from 2 nodes to 6 based on the workloads. when their is a
> scaledown action, heat automatically execute a script on my node and
> decommission it before removing it.
>
> >>Also, I am not sure of the meaning of this --> " i'm affecting to each
> of my node a different token based on there ip address (the token is
> A+B+C+D and the ip is A.B.C.D)".
>
> look at this:
> [root@demo-server-seed-wgevseugyjd7 ~]# nodetool status bng;
> Datacenter: DC1
> ===
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  Address Load   Tokens  Owns (effective)  Host
> ID   Rack
> UN  40.0.0.149  789.03 KB  189 100.0%
> bd0b2616-18d9-4bc2-a80b-eebd67474712  RAC1
> UN  40.0.0.168  300.38 KB  208 100.0%
> ebd9732b-ebfc-4a6c-b354-d7df860b57b0  RAC1
>
> the node with address 40.0.0.149 have the token 189=40+0+0+149
> and the node with address 40.0.0.168 have the token 208=40+0+0+168
>
> this way i'm sure that each node in my cluster will have a different
> token. I don't know what will happen if all the node have the same token??
>
> >>Aren't you using RandomPartitioner or Murmur3Partitioner
>
> i'm using the default one which is
> partitioner: org.apache.cassandra.dht.Murmur3Partitioner
>
>
> in order to configure cassandra on each node i'm using this script
>
>   inputs:
>   - name: IP
>   - name: SEED
>   config: |
> #!/bin/bash -v
> cat << EOF >> /etc/resolv.conf
> nameserver 8.8.8.8
> nameserver 192.168.5.1
> EOF
>
> DEFAULT=${DEFAULT:-/etc/cassandra/default.conf}
> CONFIG=/etc/cassandra/conf
> IFS="." read a b c d <<< $IP
> s="$[a[0]+b[0]+c[0]+d[0]]"
> sed -i -e "s/^cluster_name.*/cluster_name: 'Cassandra cluster for
> freeradius'/" $CONFIG/cassandra.yaml
> sed -i -e "s/^num_tokens.*/num_tokens: $s/" $CONFIG/cassandra.yaml
> sed -i -e "s/^listen_address.*/listen_address: $IP/"
> $CONFIG/cassandra.yaml
> sed -i -e "s/^rpc_address.*/rpc_address: 0.0.0.0/"
> $CONFIG/cassandra.yaml
> sed -i -e "s/^broadcast_address.*/broadcast_address: $IP/"
> $CONFIG/cassandra.yaml
> sed -i -e "s/broadcast_rpc_address.*/broadcast_rpc_address: $IP/"
> $CONFIG/cassandra.yaml
> sed -i -e
> "s/^commitlog_segment_size_in_mb.*/commitlog_segment_size_in_mb: 32/"
> $CONFIG/cassandra.yaml
> sed -i -e "s/# JVM_OPTS=\"\$JVM_OPTS
> -Djava.rmi.server.hostname=\"/JVM_OPTS=\"\$JVM_OPTS
> -Djava.rmi.server.hostname=$IP\"/" $CONFIG/cassandra-env.sh
> sed -i -e "s/- seeds.*/- seeds: \"$SEED\"/" $CONFIG/cassandra.yaml
>
> sed -i -e "s/^endpoint_snitch.*/endpoint_snitch:
> GossipingPropertyFileSnitch/" $CONFIG/cassandra.yaml
> echo MAX_HEAP_SIZE="4G" >>  $CONFIG/cassandra-env.sh
> echo HEAP_NEWSIZE="800M" >> $CONFIG/cassandra-env.sh
> service cassandra stop
> rm -rf /var/lib/cassandra/data/system/*
> service cassandra start
>
>
>
> 2015-09-07 16:30 GMT+02:00 

cassandra cluster loadbalancing

2015-08-05 Thread ICHIBA Sara
hello there,

Can you tell me please how can I loadbalance my canssandra cluster. When I
do nodetool status I can see that the load is not loadbalanced among my
cassandra nodes

Datacenter: datacenter1
===
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address Load   Tokens  OwnsHost
ID   Rack
UN  20.0.0.241  925.53 KB  261 ?
80303bcd-613c-413b-8e3e-c1e1fdb4ef47  rack1
UN  20.0.0.242  885.02 KB  262 ?
915fa052-205e-4a91-bb31-464483072c9d  rack1
UN  20.0.0.243  946.05 KB  263 ?
f5f87c82-4cce-40ea-91da-c01e815aa316  rack1
UN  20.0.0.244  933.82 KB  264 ?
ae9fa389-7275-427d-ab0b-34bff6428c5f  rack1
UN  20.0.0.245  907.2 KB   265 ?
30d64dfe-feaf-449d-bb6f-bc1dfff14c36  rack1
UN  20.0.0.246  597.77 KB  266 ?
0983dc92-eb94-469e-9cd1-856afe32d1a1  rack1
UN  20.0.0.251  524.99 KB  271 ?
92058160-1076-40d5-b209-4250e31f39fa  rack1
UN  20.0.0.238  560.87 KB  258 ?
847673e2-6428-49a5-bc71-42006db13c37  rack1

thank you for your response,
sara


'CLUSTERING' columns

2015-06-23 Thread ICHIBA Sara
Hey there,

I have imported the following schema to my cassandra db


no file cassandra.h found

2015-06-11 Thread ICHIBA Sara
hey there,

I'm trying to compile a script which include the line  #include
cassandra.h . the compilation is never completed and I have the error
file/directory cassandra.h not found. Any idea how to fix this knowing that
I have the Datastax Cassandra cpp-driver installed??

In advance, thank you for your response,
Sara


Re: cassandra installation

2015-06-09 Thread ICHIBA Sara
cool , thank you for the suggestion.

2015-06-09 17:40 GMT+02:00 Carlos Rolo r...@pythian.com:

 (Some self-promotion here)

 You can follow this blog to help you out:
 http://www.pythian.com/blog/from-0-to-cassandra-an-exhaustive-approach-to-installing-cassandra/

 Regards,

 Carlos Juzarte Rolo
 Cassandra Consultant

 Pythian - Love your data

 rolo@pythian | Twitter: cjrolo | Linkedin: *linkedin.com/in/carlosjuzarterolo
 http://linkedin.com/in/carlosjuzarterolo*
 Mobile: +31 6 159 61 814 | Tel: +1 613 565 8696 x1649
 www.pythian.com

 On Tue, Jun 9, 2015 at 5:38 PM, ICHIBA Sara ichi.s...@gmail.com wrote:

 Ok thank you very much. I got my answer :)

 2015-06-09 17:34 GMT+02:00 Alex Popescu al...@datastax.com:

 The JVM is the runtime platform for Cassandra. You can use any driver
 with it (there's no default driver). DataStax provides quite a few open
 source drivers [1] and there are also community maintained drivers [2]

 [1]: https://github.com/datastax/

 [2]: http://planetcassandra.org/client-drivers-tools/

 On Tue, Jun 9, 2015 at 8:26 AM, ICHIBA Sara ichi.s...@gmail.com wrote:

 hey there,

 In order to install cassandra, java has to be installed first. is that
 mean that the default driver of cassandra is java? what if we wanna use the
 cpp driver?

 P.S 1: my questions might be so dump, but I will really appreciate an
 answer.
 PS 2: I'm intern and i'm completely new to cassandra so...




 --
 Bests,

 Alex Popescu | @al3xandru
 Sen. Product Manager @ DataStax




 --






Re: cassandra installation

2015-06-09 Thread ICHIBA Sara
Ok thank you very much. I got my answer :)

2015-06-09 17:34 GMT+02:00 Alex Popescu al...@datastax.com:

 The JVM is the runtime platform for Cassandra. You can use any driver with
 it (there's no default driver). DataStax provides quite a few open source
 drivers [1] and there are also community maintained drivers [2]

 [1]: https://github.com/datastax/

 [2]: http://planetcassandra.org/client-drivers-tools/

 On Tue, Jun 9, 2015 at 8:26 AM, ICHIBA Sara ichi.s...@gmail.com wrote:

 hey there,

 In order to install cassandra, java has to be installed first. is that
 mean that the default driver of cassandra is java? what if we wanna use the
 cpp driver?

 P.S 1: my questions might be so dump, but I will really appreciate an
 answer.
 PS 2: I'm intern and i'm completely new to cassandra so...




 --
 Bests,

 Alex Popescu | @al3xandru
 Sen. Product Manager @ DataStax




cassandra installation

2015-06-09 Thread ICHIBA Sara
hey there,

In order to install cassandra, java has to be installed first. is that mean
that the default driver of cassandra is java? what if we wanna use the cpp
driver?

P.S 1: my questions might be so dump, but I will really appreciate an
answer.
PS 2: I'm intern and i'm completely new to cassandra so...