Re: why the cluster does not work well after addding two new nodes

2017-08-29 Thread @Nandan@
Hi ,
What happened wrong from starting, I am just listing down:-
1) Had 2 nodes servers but created Keyspace with RF 3. [Always make sure RF
<= Total No. of Nodes]
2) While Adding New Nodes, Make sure that Auto_bootstraping is Enable or
not.
3) Once You added 2 new nodes, better things will be you have to do node
rebalance.
There are 2 different way by which you can do rebalance.
A) Use OpsCenter -> And select Rebalance Cluster.
B) Use onnodetool cleanup that node afterward to clean up data no longer
belonging to that node.

Best Regards,
Nandan


On Wed, Aug 30, 2017 at 12:14 PM, 赵豫峰  wrote:

> Hi, I have a cluster with two node servers(I know it’s in a wrong way  but
> it‘s builded by another colleague who has left), and it's keyspace set like:
>
> CREATE KEYSPACE my_keyspace WITH replication = {'class': 'SimpleStrategy',
> 'replication_factor': '3'}  AND durable_writes = true;
>
> one day my boss said one node was down for a long time and another worked
> normally, tell my to restart the cluster.
>
> First, I make a snapshot from the working node;
> then, I check the data numbers with select count(*) cql statement, the
> result is more then 17;
> Next, I add two new nodes. After new node worked, I use select
> count(*)  cql to check the data several times, but now I get uncertain
> resluts, and each reslut is less then 1; I check node status with
> ./nodetool status cql, and every node is UN, but the load of two new nodes
> is far less then the normal node。
> I stop the two new nodes, use “select count(*)” cql and get the right
> result again.
>
> I build a new cluster in sandbox env with snapshot file, and get the same
> result like above。 I used "./nodetool repair" sql,then the cluster works
> well but I don't know why.
>
> I guess it because two nodes with "replication = {'class':
> 'SimpleStrategy', 'replication_factor': '3'} " can make splite brain and
> the data won't be consistent,or the data file is broken but not make
> sure。Why did it happen, why I have to use "./nodetool repair" command, and
> when to use it?
>
> Thanks!
>
>
>
>
> --
> 赵豫峰
>
> 环信即时通讯云/研发
>
>


Re: Rack Awareness

2017-08-29 Thread kurt greaves
Cassandra understands racks based on the configured snitch and the rack
assigned to each node (for example in cassandra-rackdc.properties if using
GossipingPropertyFileSnitch). If you have racks configured, to perform a
"rack-aware" repair you would simply need to run repair on only one rack.
Note that there is no real concept of a "rack-aware" repair, it's just a
side effect of the replication strategy and topology choices you make.​


Re: Working With Prepared Statements

2017-08-29 Thread kurt greaves
>From memory prepared statements that are idempotent will not be set as
idempotent, so if you are using prepared statements that you know are
idempotent you should make sure to set idempotent on them. For java driver
see https://github.com/datastax/java-driver/tree/3.x/manual/idempotence​


why the cluster does not work well after addding two new nodes

2017-08-29 Thread 赵豫峰
Hi, I have a cluster with two node servers(I know it’s in a wrong way  but it‘s 
builded by another colleague who has left), and it's keyspace set like:


CREATE KEYSPACE my_keyspace WITH replication = {'class': 'SimpleStrategy', 
'replication_factor': '3'}  AND durable_writes = true;


one day my boss said one node was down for a long time and another worked 
normally, tell my to restart the cluster.


First, I make a snapshot from the working node;
then, I check the data numbers with select count(*) cql statement, the result 
is more then 17;
Next, I add two new nodes. After new node worked, I use select count(*)  cql to 
check the data several times, but now I get uncertain resluts, and each reslut 
is less then 1; I check node status with ./nodetool status cql, and every 
node is UN, but the load of two new nodes is far less then the normal node。
I stop the two new nodes, use “select count(*)” cql and get the right result 
again.


I build a new cluster in sandbox env with snapshot file, and get the same 
result like above。 I used "./nodetool repair" sql,then the cluster works well 
but I don't know why.


I guess it because two nodes with "replication = {'class': 'SimpleStrategy', 
'replication_factor': '3'} " can make splite brain and the data won't be 
consistent,or the data file is broken but not make sure。Why did it happen, why 
I have to use "./nodetool repair" command, and when to use it?


Thanks!





--


赵豫峰



环信即时通讯云/研发

Re: timeouts on counter tables

2017-08-29 Thread Erick Ramirez
Is it possible at all that you may have a data hotspot if it's not
hardware-related?

On Mon, Aug 28, 2017 at 11:30 AM, kurt greaves  wrote:

> If every node is a replica it sounds like you've got hardware issues. Have
> you compared iostat to the "normal" nodes? I assume there is nothing
> different in the logs on this one node?
> Also sanity check, you are using DCAwareRoundRobinPolicy?
> ​
>


Re: Conection refuse

2017-08-29 Thread Amir Shahinpour
Thanks Akhil, I will follow your steps. Thanks for the links.

Best,
Amirali

On Tue, Aug 29, 2017 at 8:19 PM, Akhil Mehra  wrote:

> To install make sure:
>
> Your cluster name on each node are the same.
> You configure your seed nodes. Make one node the seed node and added seed
> configuration to all your yaml files.
> Ensure that intra-node communication is on the same port. By default this
> is on port 7000
> Do not startup all nodes at the same time. Only add nodes when others have
> already bootstrapped. This is essential
>
> I have writing a blog post outline installing Cassandra using  docker (
> http://abiasforaction.net/apache-cassandra-cluster-docker/). Good way to
> creating a test cluster quickly.
>
> Docker cluster is good for dev and test purposes only. Would not use
> docker for.
>
> Alternately https://github.com/pcmanus/ccm is a popular tool for creating
> and destroying local clusters.
>
> I hope that helps.
>
> Cheers,
> Akhil
>
>
>
> On 30/08/2017, at 1:59 PM, Amir Shahinpour  wrote:
>
> Thanks Akhil,
>
> I will do it. For setting up my second node, do you have any good source
> that I can follow to make sure I am doing everything correct? I have been
> googling around and quite frankly all the source that I found in the Google
> were kind of different from each other and I guess that is why I was not
> able to connect these two nodes together. So I am still not sure what steps
> should I take to add a new node to a cluster. Thanks again.
>
> Thanks in Advance,
> Amir
>
> On Tue, Aug 29, 2017 at 6:53 PM, Akhil Mehra  wrote:
>
>>
>> If the *data is not important* then stop all nodes. On each node empty
>> your commitlog, data, hints and saved_cache directories.
>>
>> Start one node. Wait for it to boot up successfully i.e. logs have no
>> errors and  you can connect to it using cqlsh.
>>
>> Start your second node and make sure it bootstraps and becomes part of
>> the cluster.  Since you will have no data this should be quick and simple.
>>
>> Regards,
>> Akhil
>>
>> On 30/08/2017, at 1:24 PM, Amir Shahinpour  wrote:
>>
>> Akhil,
>>
>> Commit log directory from yaml file is: /var/lib/cassandra/commitlog
>>
>> So basically I removed it. Can I copy a new one from another node? or
>> somehow generate one?
>>
>> Yes, the rm -rf was on the original and the only node. I stopped the C*
>> and ran the rm -rf /var/lib/cassandra/*.
>> At this point, the data that I lost is not very important, because it was
>> a dev environment that I am setting up. But I have to be able to make this
>> node running and talking to the new node. Neither CQLSH nor nodetool works
>> at this time.
>>
>> Best,
>> Amirali
>>
>>
>> On Tue, Aug 29, 2017 at 2:49 PM, Akhil Mehra  w
>> rote:
>> What directory was the data and commit logs stored on the original
>> working node. You can look up your cassandra.yaml to figure this out. Its
>> good to confirm.
>>
>> Was the rm -rf run on the original working node?
>>
>> Cheers,
>> Akhil
>>
>> On 30/08/2017, at 9:37 AM, Amir Shahinpour  wrote:
>>
>> Yes both of the nodes are down.
>>
>> On Aug 29, 2017 2:30 PM, "Akhil Mehra"  wrote:
>> Cassandra is doing a health check when it is starting up and failing due
>> to being unable to ready files in the system key space. Here is the comment
>> in the segment of the code that threw the exception.
>>
>> https://github.com/apache/cassandra/blob/trunk/src/java/org/
>> apache/cassandra/db/SystemKeyspace.java#L804-L810
>> /**
>>  * One of three things will happen if you try to read the system
>> keyspace:
>>  * 1. files are present and you can read them: great
>>  * 2. no files are there: great (new node is assumed)
>>  * 3. files are present but you can't read them: bad
>>  * @throws ConfigurationException
>>  */
>>
>> Removing files for bootstrapping (adding a new node) a node sounds
>> incorrect. Depending on your configuration the /var/lib/cassandar by
>> default houses table data, commit logs, hints and cache. An rm -rf on it
>> sounds ominous.
>>
>> Are both your nodes down i.e. you cannot cqlsh in any of your nodes?
>>
>> Regards,
>> Akhil
>>
>>
>>
>>
>> On 30/08/2017, at 9:01 AM, Amir Shahinpour  wrote:
>>
>> Hi Lucas,
>>
>> Thanks for your response. So I checked the system.log and I found the
>> following error at the end which I think is causing the problem.
>>
>> Fatal exception during initialization
>> org.apache.cassandra.exceptions.ConfigurationException: Found system
>> keyspace files, but they couldn't be loaded!
>>
>> It could be due to removing some of the data. I ran the following command
>> to remove some data. sudo rm -rf /var/lib/cassandra/*
>>
>> I am new to Cassandra and I think I made a mistake. So I had only one
>> node which was working fine with my tables that I had. I wanted to add a
>> second node and start 

Re: Conection refuse

2017-08-29 Thread Akhil Mehra
To install make sure:

Your cluster name on each node are the same.
You configure your seed nodes. Make one node the seed node and added seed 
configuration to all your yaml files.
Ensure that intra-node communication is on the same port. By default this is on 
port 7000
Do not startup all nodes at the same time. Only add nodes when others have 
already bootstrapped. This is essential

I have writing a blog post outline installing Cassandra using  docker 
(http://abiasforaction.net/apache-cassandra-cluster-docker/ 
). Good way to 
creating a test cluster quickly.

Docker cluster is good for dev and test purposes only. Would not use docker for.

Alternately https://github.com/pcmanus/ccm  is 
a popular tool for creating and destroying local clusters.

I hope that helps.

Cheers,
Akhil



> On 30/08/2017, at 1:59 PM, Amir Shahinpour  wrote:
> 
> Thanks Akhil,
> 
> I will do it. For setting up my second node, do you have any good source that 
> I can follow to make sure I am doing everything correct? I have been googling 
> around and quite frankly all the source that I found in the Google were kind 
> of different from each other and I guess that is why I was not able to 
> connect these two nodes together. So I am still not sure what steps should I 
> take to add a new node to a cluster. Thanks again. 
> 
> Thanks in Advance,
> Amir
> 
> On Tue, Aug 29, 2017 at 6:53 PM, Akhil Mehra  > wrote:
> 
> If the data is not important then stop all nodes. On each node empty your 
> commitlog, data, hints and saved_cache directories.
> 
> Start one node. Wait for it to boot up successfully i.e. logs have no errors 
> and  you can connect to it using cqlsh.
> 
> Start your second node and make sure it bootstraps and becomes part of the 
> cluster.  Since you will have no data this should be quick and simple.
> 
> Regards,
> Akhil
> 
>> On 30/08/2017, at 1:24 PM, Amir Shahinpour > > wrote:
>> 
>> Akhil,
>> 
>> Commit log directory from yaml file is: /var/lib/cassandra/commitlog
>> 
>> So basically I removed it. Can I copy a new one from another node? or 
>> somehow generate one?
>> 
>> Yes, the rm -rf was on the original and the only node. I stopped the C* and 
>> ran the rm -rf /var/lib/cassandra/*. 
>> At this point, the data that I lost is not very important, because it was a 
>> dev environment that I am setting up. But I have to be able to make this 
>> node running and talking to the new node. Neither CQLSH nor nodetool works 
>> at this time. 
>> 
>> Best, 
>> Amirali
>> 
>> 
>> On Tue, Aug 29, 2017 at 2:49 PM, Akhil Mehra > > wrote:
>> What directory was the data and commit logs stored on the original working 
>> node. You can look up your cassandra.yaml to figure this out. Its good to 
>> confirm.
>> 
>> Was the rm -rf run on the original working node?
>> 
>> Cheers,
>> Akhil
>> 
>>> On 30/08/2017, at 9:37 AM, Amir Shahinpour >> > wrote:
>>> 
>>> Yes both of the nodes are down.
>>> 
>>> On Aug 29, 2017 2:30 PM, "Akhil Mehra" >> > wrote:
>>> Cassandra is doing a health check when it is starting up and failing due to 
>>> being unable to ready files in the system key space. Here is the comment in 
>>> the segment of the code that threw the exception.
>>> 
>>> https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/SystemKeyspace.java#L804-L810
>>>  
>>> 
>>> /**
>>>  * One of three things will happen if you try to read the system 
>>> keyspace:
>>>  * 1. files are present and you can read them: great
>>>  * 2. no files are there: great (new node is assumed)
>>>  * 3. files are present but you can't read them: bad
>>>  * @throws ConfigurationException
>>>  */
>>> 
>>> Removing files for bootstrapping (adding a new node) a node sounds 
>>> incorrect. Depending on your configuration the /var/lib/cassandar by 
>>> default houses table data, commit logs, hints and cache. An rm -rf on it 
>>> sounds ominous.
>>> 
>>> Are both your nodes down i.e. you cannot cqlsh in any of your nodes?
>>> 
>>> Regards,
>>> Akhil
>>> 
>>> 
>>> 
>>> 
 On 30/08/2017, at 9:01 AM, Amir Shahinpour > wrote:
 
 Hi Lucas,
 
 Thanks for your response. So I checked the system.log and I found the 
 following error at the end which I think is causing the problem.  
 
 Fatal exception during initialization
 org.apache.cassandra.exceptions.ConfigurationException: Found system 
 keyspace files, but they couldn't be 

Re: Conection refuse

2017-08-29 Thread Amir Shahinpour
Thanks Akhil,

I will do it. For setting up my second node, do you have any good source
that I can follow to make sure I am doing everything correct? I have been
googling around and quite frankly all the source that I found in the Google
were kind of different from each other and I guess that is why I was not
able to connect these two nodes together. So I am still not sure what steps
should I take to add a new node to a cluster. Thanks again.

Thanks in Advance,
Amir

On Tue, Aug 29, 2017 at 6:53 PM, Akhil Mehra  wrote:

>
> If the *data is not important* then stop all nodes. On each node empty
> your commitlog, data, hints and saved_cache directories.
>
> Start one node. Wait for it to boot up successfully i.e. logs have no
> errors and  you can connect to it using cqlsh.
>
> Start your second node and make sure it bootstraps and becomes part of the
> cluster.  Since you will have no data this should be quick and simple.
>
> Regards,
> Akhil
>
> On 30/08/2017, at 1:24 PM, Amir Shahinpour  wrote:
>
> Akhil,
>
> Commit log directory from yaml file is: /var/lib/cassandra/commitlog
>
> So basically I removed it. Can I copy a new one from another node? or
> somehow generate one?
>
> Yes, the rm -rf was on the original and the only node. I stopped the C*
> and ran the rm -rf /var/lib/cassandra/*.
> At this point, the data that I lost is not very important, because it was
> a dev environment that I am setting up. But I have to be able to make this
> node running and talking to the new node. Neither CQLSH nor nodetool works
> at this time.
>
> Best,
> Amirali
>
>
> On Tue, Aug 29, 2017 at 2:49 PM, Akhil Mehra  wrote:
> What directory was the data and commit logs stored on the original working
> node. You can look up your cassandra.yaml to figure this out. Its good to
> confirm.
>
> Was the rm -rf run on the original working node?
>
> Cheers,
> Akhil
>
> On 30/08/2017, at 9:37 AM, Amir Shahinpour  wrote:
>
> Yes both of the nodes are down.
>
> On Aug 29, 2017 2:30 PM, "Akhil Mehra"  wrote:
> Cassandra is doing a health check when it is starting up and failing due
> to being unable to ready files in the system key space. Here is the comment
> in the segment of the code that threw the exception.
>
> https://github.com/apache/cassandra/blob/trunk/src/java/
> org/apache/cassandra/db/SystemKeyspace.java#L804-L810
> /**
>  * One of three things will happen if you try to read the system
> keyspace:
>  * 1. files are present and you can read them: great
>  * 2. no files are there: great (new node is assumed)
>  * 3. files are present but you can't read them: bad
>  * @throws ConfigurationException
>  */
>
> Removing files for bootstrapping (adding a new node) a node sounds
> incorrect. Depending on your configuration the /var/lib/cassandar by
> default houses table data, commit logs, hints and cache. An rm -rf on it
> sounds ominous.
>
> Are both your nodes down i.e. you cannot cqlsh in any of your nodes?
>
> Regards,
> Akhil
>
>
>
>
> On 30/08/2017, at 9:01 AM, Amir Shahinpour  wrote:
>
> Hi Lucas,
>
> Thanks for your response. So I checked the system.log and I found the
> following error at the end which I think is causing the problem.
>
> Fatal exception during initialization
> org.apache.cassandra.exceptions.ConfigurationException: Found system
> keyspace files, but they couldn't be loaded!
>
> It could be due to removing some of the data. I ran the following command
> to remove some data. sudo rm -rf /var/lib/cassandra/*
>
> I am new to Cassandra and I think I made a mistake. So I had only one node
> which was working fine with my tables that I had. I wanted to add a second
> node and start using the real power of Cassandra. So I follow one of post
> that I found, there were some changes in cassandra.yaml file and afterwards
> I had to remove the files and that's why I run the remove command. So right
> now neither of CQLSH and nodetool works. Please let me know if you need
> any other information.
>
> Here is a screenshot of the system.log. Thanks a lot for your help.
>
> Best,
> Amir
>
> 
>
> On Tue, Aug 29, 2017 at 7:17 AM, Lucas Benevides  maurobenevides.com.br> wrote:
> Hello Amir,
>
> You should see the log. If it was installed by the apt-get tool, it should
> be in /var/log/cassandra/system.log.
> It can occur when the schema of the node you are trying to connect is out
> of date with the cluster.
> How many nodes are there in you cluster?
> What is the output of "nodetool describecluster"?
>
> Best regards,
> Lucas Benevides
>
> 2017-08-28 19:45 GMT-03:00 Amir Shahinpour :
> Hi,
>
> I am getting an error connecting to cqlsh. I am getting the following
> error.
>
> Connection error: ('Unable to connect to any servers', {'127.0.0.1':
> error(111, "Tried connecting to [('127.0.0.1', 9042)]. Last error:
> Connection 

Re: Conection refuse

2017-08-29 Thread Akhil Mehra

If the data is not important then stop all nodes. On each node empty your 
commitlog, data, hints and saved_cache directories.

Start one node. Wait for it to boot up successfully i.e. logs have no errors 
and  you can connect to it using cqlsh.

Start your second node and make sure it bootstraps and becomes part of the 
cluster.  Since you will have no data this should be quick and simple.

Regards,
Akhil

> On 30/08/2017, at 1:24 PM, Amir Shahinpour  wrote:
> 
> Akhil,
> 
> Commit log directory from yaml file is: /var/lib/cassandra/commitlog
> 
> So basically I removed it. Can I copy a new one from another node? or somehow 
> generate one?
> 
> Yes, the rm -rf was on the original and the only node. I stopped the C* and 
> ran the rm -rf /var/lib/cassandra/*. 
> At this point, the data that I lost is not very important, because it was a 
> dev environment that I am setting up. But I have to be able to make this node 
> running and talking to the new node. Neither CQLSH nor nodetool works at this 
> time. 
> 
> Best, 
> Amirali
> 
> 
> On Tue, Aug 29, 2017 at 2:49 PM, Akhil Mehra  wrote:
> What directory was the data and commit logs stored on the original working 
> node. You can look up your cassandra.yaml to figure this out. Its good to 
> confirm.
> 
> Was the rm -rf run on the original working node?
> 
> Cheers,
> Akhil
> 
>> On 30/08/2017, at 9:37 AM, Amir Shahinpour  wrote:
>> 
>> Yes both of the nodes are down.
>> 
>> On Aug 29, 2017 2:30 PM, "Akhil Mehra"  wrote:
>> Cassandra is doing a health check when it is starting up and failing due to 
>> being unable to ready files in the system key space. Here is the comment in 
>> the segment of the code that threw the exception.
>> 
>> https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/SystemKeyspace.java#L804-L810
>> /**
>>  * One of three things will happen if you try to read the system 
>> keyspace:
>>  * 1. files are present and you can read them: great
>>  * 2. no files are there: great (new node is assumed)
>>  * 3. files are present but you can't read them: bad
>>  * @throws ConfigurationException
>>  */
>> 
>> Removing files for bootstrapping (adding a new node) a node sounds 
>> incorrect. Depending on your configuration the /var/lib/cassandar by default 
>> houses table data, commit logs, hints and cache. An rm -rf on it sounds 
>> ominous.
>> 
>> Are both your nodes down i.e. you cannot cqlsh in any of your nodes?
>> 
>> Regards,
>> Akhil
>> 
>> 
>> 
>> 
>>> On 30/08/2017, at 9:01 AM, Amir Shahinpour  wrote:
>>> 
>>> Hi Lucas,
>>> 
>>> Thanks for your response. So I checked the system.log and I found the 
>>> following error at the end which I think is causing the problem.  
>>> 
>>> Fatal exception during initialization
>>> org.apache.cassandra.exceptions.ConfigurationException: Found system 
>>> keyspace files, but they couldn't be loaded!
>>> 
>>> It could be due to removing some of the data. I ran the following command 
>>> to remove some data. sudo rm -rf /var/lib/cassandra/*
>>> 
>>> I am new to Cassandra and I think I made a mistake. So I had only one node 
>>> which was working fine with my tables that I had. I wanted to add a second 
>>> node and start using the real power of Cassandra. So I follow one of post 
>>> that I found, there were some changes in cassandra.yaml file and afterwards 
>>> I had to remove the files and that's why I run the remove command. So right 
>>> now neither of CQLSH and nodetool works. Please let me know if you need any 
>>> other information. 
>>> 
>>> Here is a screenshot of the system.log. Thanks a lot for your help. 
>>> 
>>> Best, 
>>> Amir
>>> 
>>> 
>>> 
>>> On Tue, Aug 29, 2017 at 7:17 AM, Lucas Benevides 
>>>  wrote:
>>> Hello Amir,
>>> 
>>> You should see the log. If it was installed by the apt-get tool, it should 
>>> be in /var/log/cassandra/system.log. 
>>> It can occur when the schema of the node you are trying to connect is out 
>>> of date with the cluster. 
>>> How many nodes are there in you cluster? 
>>> What is the output of "nodetool describecluster"?
>>> 
>>> Best regards,
>>> Lucas Benevides
>>> 
>>> 2017-08-28 19:45 GMT-03:00 Amir Shahinpour :
>>> Hi,
>>> 
>>> I am getting an error connecting to cqlsh. I am getting the following 
>>> error. 
>>> 
>>> Connection error: ('Unable to connect to any servers', {'127.0.0.1': 
>>> error(111, "Tried connecting to [('127.0.0.1', 9042)]. Last error: 
>>> Connection refused")})
>>> 
>>> I change the Cassandra.yaml file setting for rpc_address to my ip address 
>>> and listen_address to localhost. 
>>> 
>>> 
>>> listen_address: localhost
>>> rpc_address: my_IP
>>> 
>>> I also tried to change the cassandra-env.sh  to add my IP address but still 
>>> same error. 
>>> 
>>> JVM_OPTS="$JVM_OPTS -Djava.rmi.server.hostname=my_IP"
>>> 

Re: Conection refuse

2017-08-29 Thread Amir Shahinpour
Akhil,

Commit log directory from yaml file is: /var/lib/cassandra/commitlog

So basically I removed it. Can I copy a new one from another node? or
somehow generate one?

Yes, the rm -rf was on the original and the only node. I stopped the C* and
ran the rm -rf /var/lib/cassandra/*.
At this point, the data that I lost is not very important, because it was a
dev environment that I am setting up. But I have to be able to make this
node running and talking to the new node. Neither CQLSH nor nodetool works
at this time.

Best,
Amirali


On Tue, Aug 29, 2017 at 2:49 PM, Akhil Mehra  wrote:

> What directory was the data and commit logs stored on the original working
> node. You can look up your cassandra.yaml to figure this out. Its good to
> confirm.
>
> Was the rm -rf run on the original working node?
>
> Cheers,
> Akhil
>
> On 30/08/2017, at 9:37 AM, Amir Shahinpour  wrote:
>
> Yes both of the nodes are down.
>
> On Aug 29, 2017 2:30 PM, "Akhil Mehra"  wrote:
>
>> Cassandra is doing a health check when it is starting up and failing due
>> to being unable to ready files in the system key space. Here is the comment
>> in the segment of the code that threw the exception.
>>
>> https://github.com/apache/cassandra/blob/trunk/src/java/org/
>> apache/cassandra/db/SystemKeyspace.java#L804-L810
>> /**
>> * One of three things will happen if you try to read the system keyspace:
>> * 1. files are present and you can read them: great
>> * 2. no files are there: great (new node is assumed)
>> * 3. files are present but you can't read them: bad
>> * @throws ConfigurationException
>> */
>>
>> Removing files for bootstrapping (adding a new node) a node sounds
>> incorrect. Depending on your configuration the /var/lib/cassandar by
>> default houses table data, commit logs, hints and cache. An rm -rf on it
>> sounds ominous.
>>
>> Are both your nodes down i.e. you cannot cqlsh in any of your nodes?
>>
>> Regards,
>> Akhil
>>
>>
>>
>>
>> On 30/08/2017, at 9:01 AM, Amir Shahinpour  wrote:
>>
>> Hi Lucas,
>>
>> Thanks for your response. So I checked the system.log and I found the
>> following error at the end which I think is causing the problem.
>>
>> Fatal exception during initialization
>> org.apache.cassandra.exceptions.ConfigurationException: Found system
>> keyspace files, but they couldn't be loaded!
>>
>> It could be due to removing some of the data. I ran the following command
>> to remove some data. sudo rm -rf /var/lib/cassandra/*
>>
>> I am new to Cassandra and I think I made a mistake. So I had only one
>> node which was working fine with my tables that I had. I wanted to add a
>> second node and start using the real power of Cassandra. So I follow one of
>> post that I found, there were some changes in cassandra.yaml file and
>> afterwards I had to remove the files and that's why I run the remove
>> command. So right now neither of CQLSH and nodetool works. Please let me
>> know if you need any other information.
>>
>> Here is a screenshot of the system.log. Thanks a lot for your help.
>>
>> Best,
>> Amir
>>
>> 
>>
>> On Tue, Aug 29, 2017 at 7:17 AM, Lucas Benevides <
>> lu...@maurobenevides.com.br> wrote:
>>
>>> Hello Amir,
>>>
>>> You should see the log. If it was installed by the apt-get tool, it
>>> should be in /var/log/cassandra/system.log.
>>> It can occur when the schema of the node you are trying to connect is
>>> out of date with the cluster.
>>> How many nodes are there in you cluster?
>>> What is the output of "nodetool describecluster"?
>>>
>>> Best regards,
>>> Lucas Benevides
>>>
>>> 2017-08-28 19:45 GMT-03:00 Amir Shahinpour :
>>>
 Hi,

 I am getting an error connecting to cqlsh. I am getting the following
 error.

 Connection error: ('Unable to connect to any servers', {'127.0.0.1':
 error(111, "Tried connecting to [('127.0.0.1', 9042)]. Last error:
 Connection refused")})

 I change the Cassandra.yaml file setting for rpc_address to my ip
 address and listen_address to localhost.


 listen_address: localhost
 rpc_address: my_IP

 I also tried to change the cassandra-env.sh  to add my IP address but
 still same error.

 JVM_OPTS="$JVM_OPTS -Djava.rmi.server.hostname=my_IP"

 Any suggestion?




>>>
>>
>>
>


nodetool gossipinfo question

2017-08-29 Thread Gopal, Dhruva
Hi –
  I have a question on the significance a particular attribute in the output 
result for ‘nodetool gossipinfo’: RELEASE_VERSION. We have a node that is 
periodically crashing with nothing really of significance in the logs and we’re 
trying to ascertain if it’s an OS issue or something to do with Cassandra. The 
output of ‘nodetool gossipinfo’ for this node was different from all other 
nodes in the cluster – we’re using 2.1.11 in this cluster and it was set to 
RELEASE_VERSION:6:2.1.11. In a subsequent run, after another crash, while 
attempting a repair it was set to RELEASE_VERSION:7:2.1.11. All other nodes 
output RELEASE_VERSION:4:2.1.11. What is the significance of that first digit 
(the rest appears to be the version of Cassandra running on each node).


Regards,
Dhruva

This email (including any attachments) is proprietary to Aspect Software, Inc. 
and may contain information that is confidential. If you have received this 
message in error, please do not read, copy or forward this message. Please 
notify the sender immediately, delete it from your system and destroy any 
copies. You may not further disclose or distribute this email or its 
attachments.


Re: UnauthorizedException: user has no select permissions when quering Cassandra

2017-08-29 Thread Jeff Jirsa
Double check the replication config for that keyspace, make sure all data 
centers are spelled properly and there is no extra white space 

-- 
Jeff Jirsa


> On Aug 29, 2017, at 2:49 PM, Chuck Reynolds  wrote:
> 
>  
> We have that keyspace replicated to the same number of nodes in the ring.
>  
> Right now I can’t even run select * from system_auth.users without it timeing 
> out.
>  
> From: Akhil Mehra 
> Reply-To: "user@cassandra.apache.org" 
> Date: Tuesday, August 29, 2017 at 3:46 PM
> To: user 
> Subject: Re: UnauthorizedException: user has no select permissions when 
> quering Cassandra
>  
> https://docs.datastax.com/en/cassandra/3.0/cassandra/configuration/secureConfigInternalAuth.html


Re: UnauthorizedException: user has no select permissions when quering Cassandra

2017-08-29 Thread Chuck Reynolds
Yes.  We’ve tried them all.

From: Akhil Mehra 
Reply-To: "user@cassandra.apache.org" 
Date: Tuesday, August 29, 2017 at 4:06 PM
To: "user@cassandra.apache.org" 
Subject: Re: UnauthorizedException: user has no select permissions when quering 
Cassandra

What consistency are you running the query with? Does the query timeout even 
with a consistency of one?


On 30/08/2017, at 9:49 AM, Chuck Reynolds 
> wrote:


We have that keyspace replicated to the same number of nodes in the ring.

Right now I can’t even run select * from system_auth.users without it timeing 
out.

From: Akhil Mehra >
Reply-To: "user@cassandra.apache.org" 
>
Date: Tuesday, August 29, 2017 at 3:46 PM
To: user >
Subject: Re: UnauthorizedException: user has no select permissions when quering 
Cassandra

https://docs.datastax.com/en/cassandra/3.0/cassandra/configuration/secureConfigInternalAuth.html



Re: UnauthorizedException: user has no select permissions when quering Cassandra

2017-08-29 Thread Akhil Mehra
What consistency are you running the query with? Does the query timeout even 
with a consistency of one?


> On 30/08/2017, at 9:49 AM, Chuck Reynolds  wrote:
> 
>  
> We have that keyspace replicated to the same number of nodes in the ring.
>  
> Right now I can’t even run select * from system_auth.users without it timeing 
> out.
>  
> From: Akhil Mehra >
> Reply-To: "user@cassandra.apache.org " 
> >
> Date: Tuesday, August 29, 2017 at 3:46 PM
> To: user >
> Subject: Re: UnauthorizedException: user has no select permissions when 
> quering Cassandra
>  
> https://docs.datastax.com/en/cassandra/3.0/cassandra/configuration/secureConfigInternalAuth.html
>  
> 


Re: UnauthorizedException: user has no select permissions when quering Cassandra

2017-08-29 Thread Chuck Reynolds

We have that keyspace replicated to the same number of nodes in the ring.

Right now I can’t even run select * from system_auth.users without it timeing 
out.

From: Akhil Mehra 
Reply-To: "user@cassandra.apache.org" 
Date: Tuesday, August 29, 2017 at 3:46 PM
To: user 
Subject: Re: UnauthorizedException: user has no select permissions when quering 
Cassandra

https://docs.datastax.com/en/cassandra/3.0/cassandra/configuration/secureConfigInternalAuth.html


Re: Conection refuse

2017-08-29 Thread Akhil Mehra
What directory was the data and commit logs stored on the original working 
node. You can look up your cassandra.yaml to figure this out. Its good to 
confirm.

Was the rm -rf run on the original working node?

Cheers,
Akhil

> On 30/08/2017, at 9:37 AM, Amir Shahinpour  wrote:
> 
> Yes both of the nodes are down.
> 
> On Aug 29, 2017 2:30 PM, "Akhil Mehra"  > wrote:
> Cassandra is doing a health check when it is starting up and failing due to 
> being unable to ready files in the system key space. Here is the comment in 
> the segment of the code that threw the exception.
> 
> https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/SystemKeyspace.java#L804-L810
>  
> 
> /**
>  * One of three things will happen if you try to read the system keyspace:
>  * 1. files are present and you can read them: great
>  * 2. no files are there: great (new node is assumed)
>  * 3. files are present but you can't read them: bad
>  * @throws ConfigurationException
>  */
> 
> Removing files for bootstrapping (adding a new node) a node sounds incorrect. 
> Depending on your configuration the /var/lib/cassandar by default houses 
> table data, commit logs, hints and cache. An rm -rf on it sounds ominous.
> 
> Are both your nodes down i.e. you cannot cqlsh in any of your nodes?
> 
> Regards,
> Akhil
> 
> 
> 
> 
>> On 30/08/2017, at 9:01 AM, Amir Shahinpour > > wrote:
>> 
>> Hi Lucas,
>> 
>> Thanks for your response. So I checked the system.log and I found the 
>> following error at the end which I think is causing the problem.  
>> 
>> Fatal exception during initialization
>> org.apache.cassandra.exceptions.ConfigurationException: Found system 
>> keyspace files, but they couldn't be loaded!
>> 
>> It could be due to removing some of the data. I ran the following command to 
>> remove some data. sudo rm -rf /var/lib/cassandra/*
>> 
>> I am new to Cassandra and I think I made a mistake. So I had only one node 
>> which was working fine with my tables that I had. I wanted to add a second 
>> node and start using the real power of Cassandra. So I follow one of post 
>> that I found, there were some changes in cassandra.yaml file and afterwards 
>> I had to remove the files and that's why I run the remove command. So right 
>> now neither of CQLSH and nodetool works. Please let me know if you need any 
>> other information. 
>> 
>> Here is a screenshot of the system.log. Thanks a lot for your help. 
>> 
>> Best, 
>> Amir
>> 
>> 
>> 
>> On Tue, Aug 29, 2017 at 7:17 AM, Lucas Benevides 
>> > wrote:
>> Hello Amir,
>> 
>> You should see the log. If it was installed by the apt-get tool, it should 
>> be in /var/log/cassandra/system.log. 
>> It can occur when the schema of the node you are trying to connect is out of 
>> date with the cluster. 
>> How many nodes are there in you cluster? 
>> What is the output of "nodetool describecluster"?
>> 
>> Best regards,
>> Lucas Benevides
>> 
>> 2017-08-28 19:45 GMT-03:00 Amir Shahinpour > >:
>> Hi,
>> 
>> I am getting an error connecting to cqlsh. I am getting the following error. 
>> 
>> Connection error: ('Unable to connect to any servers', {'127.0.0.1': 
>> error(111, "Tried connecting to [('127.0.0.1', 9042)]. Last error: 
>> Connection refused")})
>> 
>> I change the Cassandra.yaml file setting for rpc_address to my ip address 
>> and listen_address to localhost. 
>> 
>> 
>> listen_address: localhost
>> rpc_address: my_IP
>> 
>> I also tried to change the cassandra-env.sh  to add my IP address but still 
>> same error. 
>> 
>> JVM_OPTS="$JVM_OPTS -Djava.rmi.server.hostname=my_IP"
>> Any suggestion?
>> 
>> 
>> 
>> 
>> 
> 



Re: UnauthorizedException: user has no select permissions when quering Cassandra

2017-08-29 Thread Akhil Mehra
I could be that authorisation is added to a node without increasing the 
replication factor for the system_auth keyspace 
(https://docs.datastax.com/en/cassandra/3.0/cassandra/configuration/secureConfigInternalAuth.html
 
)

or for some reason the authorisation has not replicated to a particular node.

Cheers,
Akhil
http://abiasforaction.net 



> On 30/08/2017, at 9:09 AM, Chuck Reynolds  wrote:
> 
> I’m receiving the following error when quering a table that I know the user 
> has super user rights to.
>  
> It only happens about 10% of the time.
>  
> com.datastax.driver.core.exceptions.UnauthorizedException: User test has no 
> SELECT permission on  or any of its parents.



Re: Conection refuse

2017-08-29 Thread Amir Shahinpour
Yes both of the nodes are down.

On Aug 29, 2017 2:30 PM, "Akhil Mehra"  wrote:

> Cassandra is doing a health check when it is starting up and failing due
> to being unable to ready files in the system key space. Here is the comment
> in the segment of the code that threw the exception.
>
> https://github.com/apache/cassandra/blob/trunk/src/java/
> org/apache/cassandra/db/SystemKeyspace.java#L804-L810
> /**
> * One of three things will happen if you try to read the system keyspace:
> * 1. files are present and you can read them: great
> * 2. no files are there: great (new node is assumed)
> * 3. files are present but you can't read them: bad
> * @throws ConfigurationException
> */
>
> Removing files for bootstrapping (adding a new node) a node sounds
> incorrect. Depending on your configuration the /var/lib/cassandar by
> default houses table data, commit logs, hints and cache. An rm -rf on it
> sounds ominous.
>
> Are both your nodes down i.e. you cannot cqlsh in any of your nodes?
>
> Regards,
> Akhil
>
>
>
>
> On 30/08/2017, at 9:01 AM, Amir Shahinpour  wrote:
>
> Hi Lucas,
>
> Thanks for your response. So I checked the system.log and I found the
> following error at the end which I think is causing the problem.
>
> Fatal exception during initialization
> org.apache.cassandra.exceptions.ConfigurationException: Found system
> keyspace files, but they couldn't be loaded!
>
> It could be due to removing some of the data. I ran the following command
> to remove some data. sudo rm -rf /var/lib/cassandra/*
>
> I am new to Cassandra and I think I made a mistake. So I had only one node
> which was working fine with my tables that I had. I wanted to add a second
> node and start using the real power of Cassandra. So I follow one of post
> that I found, there were some changes in cassandra.yaml file and
> afterwards I had to remove the files and that's why I run the remove
> command. So right now neither of CQLSH and nodetool works. Please let me
> know if you need any other information.
>
> Here is a screenshot of the system.log. Thanks a lot for your help.
>
> Best,
> Amir
>
> 
>
> On Tue, Aug 29, 2017 at 7:17 AM, Lucas Benevides <
> lu...@maurobenevides.com.br> wrote:
>
>> Hello Amir,
>>
>> You should see the log. If it was installed by the apt-get tool, it
>> should be in /var/log/cassandra/system.log.
>> It can occur when the schema of the node you are trying to connect is out
>> of date with the cluster.
>> How many nodes are there in you cluster?
>> What is the output of "nodetool describecluster"?
>>
>> Best regards,
>> Lucas Benevides
>>
>> 2017-08-28 19:45 GMT-03:00 Amir Shahinpour :
>>
>>> Hi,
>>>
>>> I am getting an error connecting to cqlsh. I am getting the following
>>> error.
>>>
>>> Connection error: ('Unable to connect to any servers', {'127.0.0.1':
>>> error(111, "Tried connecting to [('127.0.0.1', 9042)]. Last error:
>>> Connection refused")})
>>>
>>> I change the Cassandra.yaml file setting for rpc_address to my ip
>>> address and listen_address to localhost.
>>>
>>>
>>> listen_address: localhost
>>> rpc_address: my_IP
>>>
>>> I also tried to change the cassandra-env.sh  to add my IP address but
>>> still same error.
>>>
>>> JVM_OPTS="$JVM_OPTS -Djava.rmi.server.hostname=my_IP"
>>>
>>> Any suggestion?
>>>
>>>
>>>
>>>
>>
>
>


Re: Conection refuse

2017-08-29 Thread Akhil Mehra
Cassandra is doing a health check when it is starting up and failing due to 
being unable to ready files in the system key space. Here is the comment in the 
segment of the code that threw the exception.

https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/SystemKeyspace.java#L804-L810
/**
 * One of three things will happen if you try to read the system keyspace:
 * 1. files are present and you can read them: great
 * 2. no files are there: great (new node is assumed)
 * 3. files are present but you can't read them: bad
 * @throws ConfigurationException
 */

Removing files for bootstrapping (adding a new node) a node sounds incorrect. 
Depending on your configuration the /var/lib/cassandar by default houses table 
data, commit logs, hints and cache. An rm -rf on it sounds ominous.

Are both your nodes down i.e. you cannot cqlsh in any of your nodes?

Regards,
Akhil




> On 30/08/2017, at 9:01 AM, Amir Shahinpour  wrote:
> 
> Hi Lucas,
> 
> Thanks for your response. So I checked the system.log and I found the 
> following error at the end which I think is causing the problem.  
> 
> Fatal exception during initialization
> org.apache.cassandra.exceptions.ConfigurationException: Found system keyspace 
> files, but they couldn't be loaded!
> 
> It could be due to removing some of the data. I ran the following command to 
> remove some data. sudo rm -rf /var/lib/cassandra/*
> 
> I am new to Cassandra and I think I made a mistake. So I had only one node 
> which was working fine with my tables that I had. I wanted to add a second 
> node and start using the real power of Cassandra. So I follow one of post 
> that I found, there were some changes in cassandra.yaml file and afterwards I 
> had to remove the files and that's why I run the remove command. So right now 
> neither of CQLSH and nodetool works. Please let me know if you need any other 
> information. 
> 
> Here is a screenshot of the system.log. Thanks a lot for your help. 
> 
> Best, 
> Amir
> 
> 
> 
> On Tue, Aug 29, 2017 at 7:17 AM, Lucas Benevides  > wrote:
> Hello Amir,
> 
> You should see the log. If it was installed by the apt-get tool, it should be 
> in /var/log/cassandra/system.log. 
> It can occur when the schema of the node you are trying to connect is out of 
> date with the cluster. 
> How many nodes are there in you cluster? 
> What is the output of "nodetool describecluster"?
> 
> Best regards,
> Lucas Benevides
> 
> 2017-08-28 19:45 GMT-03:00 Amir Shahinpour  >:
> Hi,
> 
> I am getting an error connecting to cqlsh. I am getting the following error. 
> 
> Connection error: ('Unable to connect to any servers', {'127.0.0.1': 
> error(111, "Tried connecting to [('127.0.0.1', 9042)]. Last error: Connection 
> refused")})
> 
> I change the Cassandra.yaml file setting for rpc_address to my ip address and 
> listen_address to localhost. 
> 
> 
> listen_address: localhost
> rpc_address: my_IP
> 
> I also tried to change the cassandra-env.sh  to add my IP address but still 
> same error. 
> 
> JVM_OPTS="$JVM_OPTS -Djava.rmi.server.hostname=my_IP"
> Any suggestion?
> 
> 
> 
> 
> 



UnauthorizedException: user has no select permissions when quering Cassandra

2017-08-29 Thread Chuck Reynolds
I’m receiving the following error when quering a table that I know the user has 
super user rights to.

It only happens about 10% of the time.

com.datastax.driver.core.exceptions.UnauthorizedException: User test has no 
SELECT permission on  or any of its parents.


Re: Conection refuse

2017-08-29 Thread Amir Shahinpour
Hi Lucas,

Thanks for your response. So I checked the system.log and I found the
following error at the end which I think is causing the problem.

Fatal exception during initialization
org.apache.cassandra.exceptions.ConfigurationException: Found system
keyspace files, but they couldn't be loaded!

It could be due to removing some of the data. I ran the following command
to remove some data. sudo rm -rf /var/lib/cassandra/*

I am new to Cassandra and I think I made a mistake. So I had only one node
which was working fine with my tables that I had. I wanted to add a second
node and start using the real power of Cassandra. So I follow one of post
that I found, there were some changes in cassandra.yaml file and
afterwards I had to remove the files and that's why I run the remove
command. So right now neither of CQLSH and nodetool works. Please let me
know if you need any other information.

Here is a screenshot of the system.log. Thanks a lot for your help.

Best,
Amir

[image: Inline image 1]

On Tue, Aug 29, 2017 at 7:17 AM, Lucas Benevides <
lu...@maurobenevides.com.br> wrote:

> Hello Amir,
>
> You should see the log. If it was installed by the apt-get tool, it should
> be in /var/log/cassandra/system.log.
> It can occur when the schema of the node you are trying to connect is out
> of date with the cluster.
> How many nodes are there in you cluster?
> What is the output of "nodetool describecluster"?
>
> Best regards,
> Lucas Benevides
>
> 2017-08-28 19:45 GMT-03:00 Amir Shahinpour :
>
>> Hi,
>>
>> I am getting an error connecting to cqlsh. I am getting the following
>> error.
>>
>> Connection error: ('Unable to connect to any servers', {'127.0.0.1':
>> error(111, "Tried connecting to [('127.0.0.1', 9042)]. Last error:
>> Connection refused")})
>>
>> I change the Cassandra.yaml file setting for rpc_address to my ip address
>> and listen_address to localhost.
>>
>>
>> listen_address: localhost
>> rpc_address: my_IP
>>
>> I also tried to change the cassandra-env.sh  to add my IP address but
>> still same error.
>>
>> JVM_OPTS="$JVM_OPTS -Djava.rmi.server.hostname=my_IP"
>>
>> Any suggestion?
>>
>>
>>
>>
>


RE: Running nodetool gossipinfo

2017-08-29 Thread Harper, Paul
Thank You Jeff.

From: Jeff Jirsa [mailto:jji...@gmail.com]
Sent: Tuesday, August 29, 2017 3:59 PM
To: cassandra 
Subject: Re: Running nodetool gossipinfo

Each of those fields is a versioned application state (except generation and 
heartbeat). The version applies to the application state, it's different than 
the Cassandra version.

Each line (DC, RACK, RELEASE_VERSION, etc) will be:

Name:Version:Value

If you see 2.1.11 and version 7, then the running instance has set/changed that 
field 7 times since it started (probably as the other instance either restarted 
or broadcast new info / reconnected / etc).

You probably see NET_VERSION and HOST_ID having very low versions. You probably 
see LOAD having a very high version (it's updated often).



On Tue, Aug 29, 2017 at 12:52 PM, Harper, Paul 
> wrote:

Not sure I follow the version of Cassandra is 2.1.11 correct? And 7 is the 
version number of Cassandra that is running locally.  I don’t quite follow, if 
you have time could you clarify?

Thanks
From: Xiaolong Jiang 
[mailto:xiaolong...@gmail.com]
Sent: Tuesday, August 29, 2017 3:35 PM
To: user@cassandra.apache.org
Subject: Re: Running nodetool gossipinfo

7 is the version number locally in each instance representing the instance 
state used by gossiper. it will increase at least one every second

Sent from my iPhone

On Aug 29, 2017, at 11:40 AM, Harper, Paul 
> wrote:
Hello,
Running nodetool gossipinfo trying to find out in the result set for release 
version , what does the first digit (7) represent? I assume the rest is the 
actual version number.
RELEASE_VERSION:7:2.1.11

Thanks Paul
This email (including any attachments) is proprietary to Aspect Software, Inc. 
and may contain information that is confidential. If you have received this 
message in error, please do not read, copy or forward this message. Please 
notify the sender immediately, delete it from your system and destroy any 
copies. You may not further disclose or distribute this email or its 
attachments.
This email (including any attachments) is proprietary to Aspect Software, Inc. 
and may contain information that is confidential. If you have received this 
message in error, please do not read, copy or forward this message. Please 
notify the sender immediately, delete it from your system and destroy any 
copies. You may not further disclose or distribute this email or its 
attachments.

This email (including any attachments) is proprietary to Aspect Software, Inc. 
and may contain information that is confidential. If you have received this 
message in error, please do not read, copy or forward this message. Please 
notify the sender immediately, delete it from your system and destroy any 
copies. You may not further disclose or distribute this email or its 
attachments.


Re: Running nodetool gossipinfo

2017-08-29 Thread Jeff Jirsa
Each of those fields is a versioned application state (except generation
and heartbeat). The version applies to the application state, it's
different than the Cassandra version.

Each line (DC, RACK, RELEASE_VERSION, etc) will be:

Name:Version:Value

If you see 2.1.11 and version 7, then the running instance has set/changed
that field 7 times since it started (probably as the other instance either
restarted or broadcast new info / reconnected / etc).

You probably see NET_VERSION and HOST_ID having very low versions. You
probably see LOAD having a very high version (it's updated often).



On Tue, Aug 29, 2017 at 12:52 PM, Harper, Paul 
wrote:

>
>
> Not sure I follow the version of Cassandra is 2.1.11 correct? And 7 is the
> version number of Cassandra that is running locally.  I don’t quite follow,
> if you have time could you clarify?
>
>
>
> Thanks
>
> *From:* Xiaolong Jiang [mailto:xiaolong...@gmail.com]
> *Sent:* Tuesday, August 29, 2017 3:35 PM
> *To:* user@cassandra.apache.org
> *Subject:* Re: Running nodetool gossipinfo
>
>
>
> 7 is the version number locally in each instance representing the instance
> state used by gossiper. it will increase at least one every second
>
> Sent from my iPhone
>
>
> On Aug 29, 2017, at 11:40 AM, Harper, Paul  wrote:
>
> Hello,
>
> Running nodetool gossipinfo trying to find out in the result set for
> release version , what does the first digit (7) represent? I assume the
> rest is the actual version number.
>
> RELEASE_VERSION:7:2.1.11
>
>
>
> Thanks Paul
>
> This email (including any attachments) is proprietary to Aspect Software,
> Inc. and may contain information that is confidential. If you have received
> this message in error, please do not read, copy or forward this message.
> Please notify the sender immediately, delete it from your system and
> destroy any copies. You may not further disclose or distribute this email
> or its attachments.
>
> This email (including any attachments) is proprietary to Aspect Software,
> Inc. and may contain information that is confidential. If you have received
> this message in error, please do not read, copy or forward this message.
> Please notify the sender immediately, delete it from your system and
> destroy any copies. You may not further disclose or distribute this email
> or its attachments.
>


RE: Running nodetool gossipinfo

2017-08-29 Thread Harper, Paul

Not sure I follow the version of Cassandra is 2.1.11 correct? And 7 is the 
version number of Cassandra that is running locally.  I don’t quite follow, if 
you have time could you clarify?

Thanks
From: Xiaolong Jiang [mailto:xiaolong...@gmail.com]
Sent: Tuesday, August 29, 2017 3:35 PM
To: user@cassandra.apache.org
Subject: Re: Running nodetool gossipinfo

7 is the version number locally in each instance representing the instance 
state used by gossiper. it will increase at least one every second

Sent from my iPhone

On Aug 29, 2017, at 11:40 AM, Harper, Paul 
> wrote:
Hello,
Running nodetool gossipinfo trying to find out in the result set for release 
version , what does the first digit (7) represent? I assume the rest is the 
actual version number.
RELEASE_VERSION:7:2.1.11

Thanks Paul
This email (including any attachments) is proprietary to Aspect Software, Inc. 
and may contain information that is confidential. If you have received this 
message in error, please do not read, copy or forward this message. Please 
notify the sender immediately, delete it from your system and destroy any 
copies. You may not further disclose or distribute this email or its 
attachments.
This email (including any attachments) is proprietary to Aspect Software, Inc. 
and may contain information that is confidential. If you have received this 
message in error, please do not read, copy or forward this message. Please 
notify the sender immediately, delete it from your system and destroy any 
copies. You may not further disclose or distribute this email or its 
attachments.


Re: Running nodetool gossipinfo

2017-08-29 Thread Xiaolong Jiang
7 is the version number locally in each instance representing the instance 
state used by gossiper. it will increase at least one every second

Sent from my iPhone

> On Aug 29, 2017, at 11:40 AM, Harper, Paul  wrote:
> 
> Hello,
> Running nodetool gossipinfo trying to find out in the result set for release 
> version , what does the first digit (7) represent? I assume the rest is the 
> actual version number.
> RELEASE_VERSION:7:2.1.11  
>  
> Thanks Paul
> This email (including any attachments) is proprietary to Aspect Software, 
> Inc. and may contain information that is confidential. If you have received 
> this message in error, please do not read, copy or forward this message. 
> Please notify the sender immediately, delete it from your system and destroy 
> any copies. You may not further disclose or distribute this email or its 
> attachments.


C++ driver - CassCluster lifetime

2017-08-29 Thread John Ruffer
Hey all,

Working with the datastax C++ driver right now, and I'm wondering, is there
a strong need for me to retain a valid CassCluster object after my session
has been connected? Is the cost of a CassCluster creation minimal, such
that later calls to create/connect a session I could just create a new
cluster object on the fly?

Thanks,

John


Re: Rack Awareness

2017-08-29 Thread Jeff Jirsa
What command exactly do you think gives you a rack-aware repair?


On Tue, Aug 29, 2017 at 11:52 AM, Mark Furlong 
wrote:

> I am getting ready to start what I understand as a rack aware repair. This
> is to run the repair on each node within the rack resulting in a repair of
> the entire cluster. My question comes due to a highly out of balance set of
> racks and I want to know if Cassandra 2.1.12 is smart enough to identify
> the racks by the rack value or by the ip address?
>
>
>
> *Mark Furlong*
>
> Sr. Database Administrator
>
> *mfurl...@ancestry.com *
> M: 801-859-7427 <(801)%20859-7427>
>
> O: 801-705-7115 <(801)%20705-7115>
>
> 1300 W Traverse Pkwy
>
> Lehi, UT 84043
>
>
>
>
>
> ​[image: http://c.mfcreative.com/mars/email/shared-icon/sig-logo.gif]
>
>
>
>
>


Rack Awareness

2017-08-29 Thread Mark Furlong
I am getting ready to start what I understand as a rack aware repair. This is 
to run the repair on each node within the rack resulting in a repair of the 
entire cluster. My question comes due to a highly out of balance set of racks 
and I want to know if Cassandra 2.1.12 is smart enough to identify the racks by 
the rack value or by the ip address?

Mark Furlong

Sr. Database Administrator

mfurl...@ancestry.com
M: 801-859-7427
O: 801-705-7115
1300 W Traverse Pkwy
Lehi, UT 84043





​[http://c.mfcreative.com/mars/email/shared-icon/sig-logo.gif]





Running nodetool gossipinfo

2017-08-29 Thread Harper, Paul
Hello,
Running nodetool gossipinfo trying to find out in the result set for release 
version , what does the first digit (7) represent? I assume the rest is the 
actual version number.
RELEASE_VERSION:7:2.1.11

Thanks Paul
This email (including any attachments) is proprietary to Aspect Software, Inc. 
and may contain information that is confidential. If you have received this 
message in error, please do not read, copy or forward this message. Please 
notify the sender immediately, delete it from your system and destroy any 
copies. You may not further disclose or distribute this email or its 
attachments.


Re: Working With Prepared Statements

2017-08-29 Thread Shalom Sagges
Thanks a lot!
I'll make sure it'll be prepared once.


Shalom Sagges
DBA
T: +972-74-700-4035
 
 We Create Meaningful Connections



On Tue, Aug 29, 2017 at 6:10 PM, I PVP  wrote:

> Hi Shalom,
>
> If that helps..
> From the documentation : "You should prepare only once, and cache the
> PreparedStatement in your application (it is thread-safe). If you call
> prepare multiple times with the same query string, the driver will log a
> warning”
>
>
> On August 29, 2017 at 12:04:34 PM, Shalom Sagges (shal...@liveperson.com)
> wrote:
>
> That's a good to know post.
>
> Thanks for the info Nicolas!
>
>
> Shalom Sagges
> DBA
> T: +972-74-700-4035 <+972%2074-700-4035>
>  
>  We Create Meaningful Connections
> 
>
>
> On Tue, Aug 29, 2017 at 3:04 PM, Nicolas Guyomar <
> nicolas.guyo...@gmail.com> wrote:
>
>> I would suggest to read this post by the last pickle:
>> http://thelastpickle.com/blog/2016/09/15/Null-bindin
>> gs-on-prepared-statements-and-undesired-tombstone-creation.html  and
>> make sure you are not concerned by the mentioned behavior, because some
>> people still choose to use C* v2.X because of some bugs in v3 branch
>>
>> Have fun !
>>
>> On 29 August 2017 at 13:43, Shalom Sagges  wrote:
>>
>>> Sounds great then.
>>>
>>> Thanks a lot guys! 
>>>
>>>
>>> Shalom Sagges
>>> DBA
>>>  
>>>  We Create Meaningful Connections
>>>
>>>
>>>
>>> On Tue, Aug 29, 2017 at 2:41 PM, Nicolas Guyomar <
>>> nicolas.guyo...@gmail.com> wrote:
>>>
 Hi Shalom,

 AFAIK, you are completely safe with prepared statement, there are no
 caveats using them, and you will have better performance.

 Make sure to only prepare them once ;)

 On 29 August 2017 at 13:41, Matija Gobec  wrote:

> I don't see any disadvantages or warning signs. You will see a
> performance increase on moderate request rate frequency.
>
> On Tue, Aug 29, 2017 at 1:28 PM, Shalom Sagges  > wrote:
>
>> Hi Matija,
>>
>> I just wish to know if there are any disadvantages when using
>> prepared statement or any warning signs I should look for. Queries will 
>> run
>> multiple times so it fits the use case.
>>
>> Thanks!
>>
>>
>> Shalom Sagges
>> DBA
>> 
>> 
>>  We Create Meaningful
>> Connections
>>
>>
>>
>> On Tue, Aug 29, 2017 at 2:18 PM, Matija Gobec 
>> wrote:
>>
>>> Do you have any concrete questions re prepared statements?
>>>
>>> They are faster to execute since the statement is already parsed and
>>> in C* and you just pass the parameters. No additional statement 
>>> processing
>>> is needed.
>>>
>>> Matija
>>>
>>> On Tue, Aug 29, 2017 at 12:33 PM, Shalom Sagges <
>>> shal...@liveperson.com> wrote:
>>>
 Insights, anyone?


 Shalom Sagges
 DBA
 
 
  We Create Meaningful
 Connections



 On Mon, Aug 28, 2017 at 10:43 AM, Shalom Sagges <
 shal...@liveperson.com> wrote:

> Hi Everyone,
>
> I want to start working with Prepared Statements.
>
> I've read https://docs.datastax.com/en/developer/java-driver/3.1/
> manual/statements/prepared/ and just wanted to know if there are
> any other considerations I need to take into account when deciding to 
> use
> Prepared Statements.
>
> Thanks!
>
>
> Shalom Sagges
> DBA
> 
> 
>  We Create Meaningful
> Connections
>
>
>


 This message may contain confidential and/or privileged
 information.
 If you are not the addressee or authorized to receive this on
 behalf of the addressee you must not use, copy, disclose or take action
 based on this message or any information herein.
 If you have received this message in error, please advise the
 sender immediately by reply email and delete this message. Thank you.

>>>

Re: Working With Prepared Statements

2017-08-29 Thread I PVP
Hi Shalom,

If that helps..
From the documentation : "You should prepare only once, and cache the 
PreparedStatement in your application (it is thread-safe). If you call prepare 
multiple times with the same query string, the driver will log a warning”



On August 29, 2017 at 12:04:34 PM, Shalom Sagges 
(shal...@liveperson.com) wrote:

That's a good to know post.

Thanks for the info Nicolas!


[https://signature.s3.amazonaws.com/2015/lp_logo.png]
Shalom Sagges
DBA
T: +972-74-700-4035
[https://signature.s3.amazonaws.com/2015/LinkedIn.png]
  [https://signature.s3.amazonaws.com/2015/Twitter.png] 
   
[https://signature.s3.amazonaws.com/2015/Facebook.png] 

We Create Meaningful Connections

[https://signature.s3.amazonaws.com/2016/banners/V1_3_email_signature.png]


On Tue, Aug 29, 2017 at 3:04 PM, Nicolas Guyomar 
> wrote:
I would suggest to read this post by the last pickle: 
http://thelastpickle.com/blog/2016/09/15/Null-bindings-on-prepared-statements-and-undesired-tombstone-creation.html
  and make sure you are not concerned by the mentioned behavior, because some 
people still choose to use C* v2.X because of some bugs in v3 branch

Have fun !

On 29 August 2017 at 13:43, Shalom Sagges 
> wrote:
Sounds great then.

Thanks a lot guys! 


[https://signature.s3.amazonaws.com/2015/lp_logo.png]
Shalom Sagges
DBA

[https://signature.s3.amazonaws.com/2015/LinkedIn.png]
  [https://signature.s3.amazonaws.com/2015/Twitter.png] 
   
[https://signature.s3.amazonaws.com/2015/Facebook.png] 

We Create Meaningful Connections





On Tue, Aug 29, 2017 at 2:41 PM, Nicolas Guyomar 
> wrote:
Hi Shalom,

AFAIK, you are completely safe with prepared statement, there are no caveats 
using them, and you will have better performance.

Make sure to only prepare them once ;)

On 29 August 2017 at 13:41, Matija Gobec 
> wrote:
I don't see any disadvantages or warning signs. You will see a performance 
increase on moderate request rate frequency.

On Tue, Aug 29, 2017 at 1:28 PM, Shalom Sagges 
> wrote:
Hi Matija,

I just wish to know if there are any disadvantages when using prepared 
statement or any warning signs I should look for. Queries will run multiple 
times so it fits the use case.

Thanks!


[https://signature.s3.amazonaws.com/2015/lp_logo.png]
Shalom Sagges
DBA

[https://signature.s3.amazonaws.com/2015/LinkedIn.png]
  [https://signature.s3.amazonaws.com/2015/Twitter.png] 
   
[https://signature.s3.amazonaws.com/2015/Facebook.png] 

We Create Meaningful Connections





On Tue, Aug 29, 2017 at 2:18 PM, Matija Gobec 
> wrote:
Do you have any concrete questions re prepared statements?

They are faster to execute since the statement is already parsed and in C* and 
you just pass the parameters. No additional statement processing is needed.

Matija

On Tue, Aug 29, 2017 at 12:33 PM, Shalom Sagges 
> wrote:
Insights, anyone?


[https://signature.s3.amazonaws.com/2015/lp_logo.png]
Shalom Sagges
DBA

[https://signature.s3.amazonaws.com/2015/LinkedIn.png]
  [https://signature.s3.amazonaws.com/2015/Twitter.png] 
   
[https://signature.s3.amazonaws.com/2015/Facebook.png] 

We Create Meaningful Connections





On Mon, Aug 28, 2017 at 10:43 AM, Shalom Sagges 
> wrote:
Hi Everyone,

I want to start working with Prepared Statements.

I've read 
https://docs.datastax.com/en/developer/java-driver/3.1/manual/statements/prepared/
 and just wanted to know if there are any other considerations I need to take 
into account when deciding to use Prepared Statements.

Thanks!


[https://signature.s3.amazonaws.com/2015/lp_logo.png]
Shalom Sagges
DBA

[https://signature.s3.amazonaws.com/2015/LinkedIn.png]
  [https://signature.s3.amazonaws.com/2015/Twitter.png] 
   
[https://signature.s3.amazonaws.com/2015/Facebook.png] 

We Create Meaningful Connections






This message may contain confidential and/or privileged information.
If you are not the addressee or 

Re: Working With Prepared Statements

2017-08-29 Thread Shalom Sagges
That's a good to know post.

Thanks for the info Nicolas!


Shalom Sagges
DBA
T: +972-74-700-4035
 
 We Create Meaningful Connections



On Tue, Aug 29, 2017 at 3:04 PM, Nicolas Guyomar 
wrote:

> I would suggest to read this post by the last pickle:
> http://thelastpickle.com/blog/2016/09/15/Null-bindings-on-prepared-
> statements-and-undesired-tombstone-creation.html  and make sure you are
> not concerned by the mentioned behavior, because some people still choose
> to use C* v2.X because of some bugs in v3 branch
>
> Have fun !
>
> On 29 August 2017 at 13:43, Shalom Sagges  wrote:
>
>> Sounds great then.
>>
>> Thanks a lot guys! 
>>
>>
>> Shalom Sagges
>> DBA
>>  
>>  We Create Meaningful Connections
>>
>>
>>
>> On Tue, Aug 29, 2017 at 2:41 PM, Nicolas Guyomar <
>> nicolas.guyo...@gmail.com> wrote:
>>
>>> Hi Shalom,
>>>
>>> AFAIK, you are completely safe with prepared statement, there are no
>>> caveats using them, and you will have better performance.
>>>
>>> Make sure to only prepare them once ;)
>>>
>>> On 29 August 2017 at 13:41, Matija Gobec  wrote:
>>>
 I don't see any disadvantages or warning signs. You will see a
 performance increase on moderate request rate frequency.

 On Tue, Aug 29, 2017 at 1:28 PM, Shalom Sagges 
 wrote:

> Hi Matija,
>
> I just wish to know if there are any disadvantages when using prepared
> statement or any warning signs I should look for. Queries will run 
> multiple
> times so it fits the use case.
>
> Thanks!
>
>
> Shalom Sagges
> DBA
> 
> 
>  We Create Meaningful
> Connections
>
>
>
> On Tue, Aug 29, 2017 at 2:18 PM, Matija Gobec 
> wrote:
>
>> Do you have any concrete questions re prepared statements?
>>
>> They are faster to execute since the statement is already parsed and
>> in C* and you just pass the parameters. No additional statement 
>> processing
>> is needed.
>>
>> Matija
>>
>> On Tue, Aug 29, 2017 at 12:33 PM, Shalom Sagges <
>> shal...@liveperson.com> wrote:
>>
>>> Insights, anyone?
>>>
>>>
>>> Shalom Sagges
>>> DBA
>>> 
>>> 
>>>  We Create Meaningful
>>> Connections
>>>
>>>
>>>
>>> On Mon, Aug 28, 2017 at 10:43 AM, Shalom Sagges <
>>> shal...@liveperson.com> wrote:
>>>
 Hi Everyone,

 I want to start working with Prepared Statements.

 I've read https://docs.datastax.com/en/developer/java-driver/3.1/
 manual/statements/prepared/ and just wanted to know if there are
 any other considerations I need to take into account when deciding to 
 use
 Prepared Statements.

 Thanks!


 Shalom Sagges
 DBA
 
 
  We Create Meaningful
 Connections



>>>
>>>
>>> This message may contain confidential and/or privileged information.
>>> If you are not the addressee or authorized to receive this on behalf
>>> of the addressee you must not use, copy, disclose or take action based 
>>> on
>>> this message or any information herein.
>>> If you have received this message in error, please advise the sender
>>> immediately by reply email and delete this message. Thank you.
>>>
>>
>>
>
> This message may contain confidential and/or privileged information.
> If you are not the addressee or authorized to receive this on behalf
> of the addressee you must not use, copy, disclose or take action based on
> this message or any information herein.
> If you have received this message in error, please advise the sender
> immediately by reply email and delete this message. Thank you.
>


>>>
>>
>> This message may contain confidential and/or privileged information.
>> If you are not the addressee or authorized to receive this on behalf of
>> the addressee you must not use, copy, disclose or take action based on this
>> message or any information herein.
>> If you have received this message in error, please advise the sender
>> immediately by reply email and delete this message. Thank you.
>>
>
>

-- 
This 

Re: Conection refuse

2017-08-29 Thread Lucas Benevides
Hello Amir,

You should see the log. If it was installed by the apt-get tool, it should
be in /var/log/cassandra/system.log.
It can occur when the schema of the node you are trying to connect is out
of date with the cluster.
How many nodes are there in you cluster?
What is the output of "nodetool describecluster"?

Best regards,
Lucas Benevides

2017-08-28 19:45 GMT-03:00 Amir Shahinpour :

> Hi,
>
> I am getting an error connecting to cqlsh. I am getting the following
> error.
>
> Connection error: ('Unable to connect to any servers', {'127.0.0.1':
> error(111, "Tried connecting to [('127.0.0.1', 9042)]. Last error:
> Connection refused")})
>
> I change the Cassandra.yaml file setting for rpc_address to my ip address
> and listen_address to localhost.
>
>
> listen_address: localhost
> rpc_address: my_IP
>
> I also tried to change the cassandra-env.sh  to add my IP address but
> still same error.
>
> JVM_OPTS="$JVM_OPTS -Djava.rmi.server.hostname=my_IP"
>
> Any suggestion?
>
>
>
>


Re: Working With Prepared Statements

2017-08-29 Thread Nicolas Guyomar
I would suggest to read this post by the last pickle:
http://thelastpickle.com/blog/2016/09/15/Null-bindings-on-prepared-statements-and-undesired-tombstone-creation.html
 and make sure you are not concerned by the mentioned behavior, because
some people still choose to use C* v2.X because of some bugs in v3 branch

Have fun !

On 29 August 2017 at 13:43, Shalom Sagges  wrote:

> Sounds great then.
>
> Thanks a lot guys! 
>
>
> Shalom Sagges
> DBA
>  
>  We Create Meaningful Connections
>
>
>
> On Tue, Aug 29, 2017 at 2:41 PM, Nicolas Guyomar <
> nicolas.guyo...@gmail.com> wrote:
>
>> Hi Shalom,
>>
>> AFAIK, you are completely safe with prepared statement, there are no
>> caveats using them, and you will have better performance.
>>
>> Make sure to only prepare them once ;)
>>
>> On 29 August 2017 at 13:41, Matija Gobec  wrote:
>>
>>> I don't see any disadvantages or warning signs. You will see a
>>> performance increase on moderate request rate frequency.
>>>
>>> On Tue, Aug 29, 2017 at 1:28 PM, Shalom Sagges 
>>> wrote:
>>>
 Hi Matija,

 I just wish to know if there are any disadvantages when using prepared
 statement or any warning signs I should look for. Queries will run multiple
 times so it fits the use case.

 Thanks!


 Shalom Sagges
 DBA
 
   We
 Create Meaningful Connections



 On Tue, Aug 29, 2017 at 2:18 PM, Matija Gobec 
 wrote:

> Do you have any concrete questions re prepared statements?
>
> They are faster to execute since the statement is already parsed and
> in C* and you just pass the parameters. No additional statement processing
> is needed.
>
> Matija
>
> On Tue, Aug 29, 2017 at 12:33 PM, Shalom Sagges <
> shal...@liveperson.com> wrote:
>
>> Insights, anyone?
>>
>>
>> Shalom Sagges
>> DBA
>> 
>> 
>>  We Create Meaningful
>> Connections
>>
>>
>>
>> On Mon, Aug 28, 2017 at 10:43 AM, Shalom Sagges <
>> shal...@liveperson.com> wrote:
>>
>>> Hi Everyone,
>>>
>>> I want to start working with Prepared Statements.
>>>
>>> I've read https://docs.datastax.com/en/developer/java-driver/3.1/
>>> manual/statements/prepared/ and just wanted to know if there are
>>> any other considerations I need to take into account when deciding to 
>>> use
>>> Prepared Statements.
>>>
>>> Thanks!
>>>
>>>
>>> Shalom Sagges
>>> DBA
>>> 
>>> 
>>>  We Create Meaningful
>>> Connections
>>>
>>>
>>>
>>
>>
>> This message may contain confidential and/or privileged information.
>> If you are not the addressee or authorized to receive this on behalf
>> of the addressee you must not use, copy, disclose or take action based on
>> this message or any information herein.
>> If you have received this message in error, please advise the sender
>> immediately by reply email and delete this message. Thank you.
>>
>
>

 This message may contain confidential and/or privileged information.
 If you are not the addressee or authorized to receive this on behalf of
 the addressee you must not use, copy, disclose or take action based on this
 message or any information herein.
 If you have received this message in error, please advise the sender
 immediately by reply email and delete this message. Thank you.

>>>
>>>
>>
>
> This message may contain confidential and/or privileged information.
> If you are not the addressee or authorized to receive this on behalf of
> the addressee you must not use, copy, disclose or take action based on this
> message or any information herein.
> If you have received this message in error, please advise the sender
> immediately by reply email and delete this message. Thank you.
>


Re: Working With Prepared Statements

2017-08-29 Thread Shalom Sagges
Sounds great then.

Thanks a lot guys! 


Shalom Sagges
DBA
 
 We Create Meaningful Connections



On Tue, Aug 29, 2017 at 2:41 PM, Nicolas Guyomar 
wrote:

> Hi Shalom,
>
> AFAIK, you are completely safe with prepared statement, there are no
> caveats using them, and you will have better performance.
>
> Make sure to only prepare them once ;)
>
> On 29 August 2017 at 13:41, Matija Gobec  wrote:
>
>> I don't see any disadvantages or warning signs. You will see a
>> performance increase on moderate request rate frequency.
>>
>> On Tue, Aug 29, 2017 at 1:28 PM, Shalom Sagges 
>> wrote:
>>
>>> Hi Matija,
>>>
>>> I just wish to know if there are any disadvantages when using prepared
>>> statement or any warning signs I should look for. Queries will run multiple
>>> times so it fits the use case.
>>>
>>> Thanks!
>>>
>>>
>>> Shalom Sagges
>>> DBA
>>>  
>>>  We Create Meaningful Connections
>>>
>>>
>>>
>>> On Tue, Aug 29, 2017 at 2:18 PM, Matija Gobec 
>>> wrote:
>>>
 Do you have any concrete questions re prepared statements?

 They are faster to execute since the statement is already parsed and in
 C* and you just pass the parameters. No additional statement processing is
 needed.

 Matija

 On Tue, Aug 29, 2017 at 12:33 PM, Shalom Sagges  wrote:

> Insights, anyone?
>
>
> Shalom Sagges
> DBA
> 
> 
>  We Create Meaningful
> Connections
>
>
>
> On Mon, Aug 28, 2017 at 10:43 AM, Shalom Sagges <
> shal...@liveperson.com> wrote:
>
>> Hi Everyone,
>>
>> I want to start working with Prepared Statements.
>>
>> I've read https://docs.datastax.com/en/developer/java-driver/3.1/
>> manual/statements/prepared/ and just wanted to know if there are any
>> other considerations I need to take into account when deciding to use
>> Prepared Statements.
>>
>> Thanks!
>>
>>
>> Shalom Sagges
>> DBA
>> 
>> 
>>  We Create Meaningful
>> Connections
>>
>>
>>
>
>
> This message may contain confidential and/or privileged information.
> If you are not the addressee or authorized to receive this on behalf
> of the addressee you must not use, copy, disclose or take action based on
> this message or any information herein.
> If you have received this message in error, please advise the sender
> immediately by reply email and delete this message. Thank you.
>


>>>
>>> This message may contain confidential and/or privileged information.
>>> If you are not the addressee or authorized to receive this on behalf of
>>> the addressee you must not use, copy, disclose or take action based on this
>>> message or any information herein.
>>> If you have received this message in error, please advise the sender
>>> immediately by reply email and delete this message. Thank you.
>>>
>>
>>
>

-- 
This message may contain confidential and/or privileged information. 
If you are not the addressee or authorized to receive this on behalf of the 
addressee you must not use, copy, disclose or take action based on this 
message or any information herein. 
If you have received this message in error, please advise the sender 
immediately by reply email and delete this message. Thank you.


Re: Working With Prepared Statements

2017-08-29 Thread Nicolas Guyomar
Hi Shalom,

AFAIK, you are completely safe with prepared statement, there are no
caveats using them, and you will have better performance.

Make sure to only prepare them once ;)

On 29 August 2017 at 13:41, Matija Gobec  wrote:

> I don't see any disadvantages or warning signs. You will see a performance
> increase on moderate request rate frequency.
>
> On Tue, Aug 29, 2017 at 1:28 PM, Shalom Sagges 
> wrote:
>
>> Hi Matija,
>>
>> I just wish to know if there are any disadvantages when using prepared
>> statement or any warning signs I should look for. Queries will run multiple
>> times so it fits the use case.
>>
>> Thanks!
>>
>>
>> Shalom Sagges
>> DBA
>>  
>>  We Create Meaningful Connections
>>
>>
>>
>> On Tue, Aug 29, 2017 at 2:18 PM, Matija Gobec 
>> wrote:
>>
>>> Do you have any concrete questions re prepared statements?
>>>
>>> They are faster to execute since the statement is already parsed and in
>>> C* and you just pass the parameters. No additional statement processing is
>>> needed.
>>>
>>> Matija
>>>
>>> On Tue, Aug 29, 2017 at 12:33 PM, Shalom Sagges 
>>> wrote:
>>>
 Insights, anyone?


 Shalom Sagges
 DBA
 
   We
 Create Meaningful Connections



 On Mon, Aug 28, 2017 at 10:43 AM, Shalom Sagges  wrote:

> Hi Everyone,
>
> I want to start working with Prepared Statements.
>
> I've read https://docs.datastax.com/en/developer/java-driver/3.1/
> manual/statements/prepared/ and just wanted to know if there are any
> other considerations I need to take into account when deciding to use
> Prepared Statements.
>
> Thanks!
>
>
> Shalom Sagges
> DBA
> 
> 
>  We Create Meaningful
> Connections
>
>
>


 This message may contain confidential and/or privileged information.
 If you are not the addressee or authorized to receive this on behalf of
 the addressee you must not use, copy, disclose or take action based on this
 message or any information herein.
 If you have received this message in error, please advise the sender
 immediately by reply email and delete this message. Thank you.

>>>
>>>
>>
>> This message may contain confidential and/or privileged information.
>> If you are not the addressee or authorized to receive this on behalf of
>> the addressee you must not use, copy, disclose or take action based on this
>> message or any information herein.
>> If you have received this message in error, please advise the sender
>> immediately by reply email and delete this message. Thank you.
>>
>
>


Re: Working With Prepared Statements

2017-08-29 Thread Matija Gobec
I don't see any disadvantages or warning signs. You will see a performance
increase on moderate request rate frequency.

On Tue, Aug 29, 2017 at 1:28 PM, Shalom Sagges 
wrote:

> Hi Matija,
>
> I just wish to know if there are any disadvantages when using prepared
> statement or any warning signs I should look for. Queries will run multiple
> times so it fits the use case.
>
> Thanks!
>
>
> Shalom Sagges
> DBA
>  
>  We Create Meaningful Connections
>
>
>
> On Tue, Aug 29, 2017 at 2:18 PM, Matija Gobec 
> wrote:
>
>> Do you have any concrete questions re prepared statements?
>>
>> They are faster to execute since the statement is already parsed and in
>> C* and you just pass the parameters. No additional statement processing is
>> needed.
>>
>> Matija
>>
>> On Tue, Aug 29, 2017 at 12:33 PM, Shalom Sagges 
>> wrote:
>>
>>> Insights, anyone?
>>>
>>>
>>> Shalom Sagges
>>> DBA
>>>  
>>>  We Create Meaningful Connections
>>>
>>>
>>>
>>> On Mon, Aug 28, 2017 at 10:43 AM, Shalom Sagges 
>>> wrote:
>>>
 Hi Everyone,

 I want to start working with Prepared Statements.

 I've read https://docs.datastax.com/en/developer/java-driver/3.1/
 manual/statements/prepared/ and just wanted to know if there are any
 other considerations I need to take into account when deciding to use
 Prepared Statements.

 Thanks!


 Shalom Sagges
 DBA
 
   We
 Create Meaningful Connections



>>>
>>>
>>> This message may contain confidential and/or privileged information.
>>> If you are not the addressee or authorized to receive this on behalf of
>>> the addressee you must not use, copy, disclose or take action based on this
>>> message or any information herein.
>>> If you have received this message in error, please advise the sender
>>> immediately by reply email and delete this message. Thank you.
>>>
>>
>>
>
> This message may contain confidential and/or privileged information.
> If you are not the addressee or authorized to receive this on behalf of
> the addressee you must not use, copy, disclose or take action based on this
> message or any information herein.
> If you have received this message in error, please advise the sender
> immediately by reply email and delete this message. Thank you.
>


Re: Working With Prepared Statements

2017-08-29 Thread Shalom Sagges
Hi Matija,

I just wish to know if there are any disadvantages when using prepared
statement or any warning signs I should look for. Queries will run multiple
times so it fits the use case.

Thanks!


Shalom Sagges
DBA
 
 We Create Meaningful Connections



On Tue, Aug 29, 2017 at 2:18 PM, Matija Gobec  wrote:

> Do you have any concrete questions re prepared statements?
>
> They are faster to execute since the statement is already parsed and in C*
> and you just pass the parameters. No additional statement processing is
> needed.
>
> Matija
>
> On Tue, Aug 29, 2017 at 12:33 PM, Shalom Sagges 
> wrote:
>
>> Insights, anyone?
>>
>>
>> Shalom Sagges
>> DBA
>>  
>>  We Create Meaningful Connections
>>
>>
>>
>> On Mon, Aug 28, 2017 at 10:43 AM, Shalom Sagges 
>> wrote:
>>
>>> Hi Everyone,
>>>
>>> I want to start working with Prepared Statements.
>>>
>>> I've read https://docs.datastax.com/en/developer/java-driver/3.1/
>>> manual/statements/prepared/ and just wanted to know if there are any
>>> other considerations I need to take into account when deciding to use
>>> Prepared Statements.
>>>
>>> Thanks!
>>>
>>>
>>> Shalom Sagges
>>> DBA
>>>  
>>>  We Create Meaningful Connections
>>>
>>>
>>>
>>
>>
>> This message may contain confidential and/or privileged information.
>> If you are not the addressee or authorized to receive this on behalf of
>> the addressee you must not use, copy, disclose or take action based on this
>> message or any information herein.
>> If you have received this message in error, please advise the sender
>> immediately by reply email and delete this message. Thank you.
>>
>
>

-- 
This message may contain confidential and/or privileged information. 
If you are not the addressee or authorized to receive this on behalf of the 
addressee you must not use, copy, disclose or take action based on this 
message or any information herein. 
If you have received this message in error, please advise the sender 
immediately by reply email and delete this message. Thank you.


Re: Working With Prepared Statements

2017-08-29 Thread Matija Gobec
Do you have any concrete questions re prepared statements?

They are faster to execute since the statement is already parsed and in C*
and you just pass the parameters. No additional statement processing is
needed.

Matija

On Tue, Aug 29, 2017 at 12:33 PM, Shalom Sagges 
wrote:

> Insights, anyone?
>
>
> Shalom Sagges
> DBA
>  
>  We Create Meaningful Connections
>
>
>
> On Mon, Aug 28, 2017 at 10:43 AM, Shalom Sagges 
> wrote:
>
>> Hi Everyone,
>>
>> I want to start working with Prepared Statements.
>>
>> I've read https://docs.datastax.com/en/developer/java-driver/3.1/
>> manual/statements/prepared/ and just wanted to know if there are any
>> other considerations I need to take into account when deciding to use
>> Prepared Statements.
>>
>> Thanks!
>>
>>
>> Shalom Sagges
>> DBA
>>  
>>  We Create Meaningful Connections
>>
>>
>>
>
>
> This message may contain confidential and/or privileged information.
> If you are not the addressee or authorized to receive this on behalf of
> the addressee you must not use, copy, disclose or take action based on this
> message or any information herein.
> If you have received this message in error, please advise the sender
> immediately by reply email and delete this message. Thank you.
>


Re: Working With Prepared Statements

2017-08-29 Thread Shalom Sagges
Insights, anyone?


Shalom Sagges
DBA
 
 We Create Meaningful Connections



On Mon, Aug 28, 2017 at 10:43 AM, Shalom Sagges 
wrote:

> Hi Everyone,
>
> I want to start working with Prepared Statements.
>
> I've read https://docs.datastax.com/en/developer/java-driver/
> 3.1/manual/statements/prepared/ and just wanted to know if there are any
> other considerations I need to take into account when deciding to use
> Prepared Statements.
>
> Thanks!
>
>
> Shalom Sagges
> DBA
>  
>  We Create Meaningful Connections
>
>
>

-- 
This message may contain confidential and/or privileged information. 
If you are not the addressee or authorized to receive this on behalf of the 
addressee you must not use, copy, disclose or take action based on this 
message or any information herein. 
If you have received this message in error, please advise the sender 
immediately by reply email and delete this message. Thank you.