Re: High CPU after read timeout

2017-07-14 Thread Vladimir Yudovin
I've created JIRA https://issues.apache.org/jira/browse/CASSANDRA-13695



Best regards, Vladimir Yudovin, 

Winguzone - Cloud Cassandra Hosting






 On Fri, 14 Jul 2017 07:23:57 -0400 Vladimir Yudovin 
vla...@winguzone.com wrote 




gt; If a client disconnects from a coordinator there is also no way for 
the replicas to know that the client was disconnected. 

 

Got it. 

 

 

 

gt; Theres internal mechanisms that don't really have a concept of 
atimeout and where we would want it to never timeout 

 

Can such timeout be passed to executing thread? For read requests it can be 
taken from xxx_equest_timeout_in_ms parameters. 

 

Because now one bad SELECT can put nodes in high load for very long time, and 
actually paralyze cluster in certain situations. 

 

 

 

 

 

Best regards, Vladimir Yudovin, 

 

Winguzone - Cloud Cassandra Hosting 

 

 

 

 

 

 

 On Fri, 14 Jul 2017 00:57:14 -0400 Chris Lohfink 
lt;clohfin...@gmail.comgt; wrote  

 

 

 

 

There is no mechanism for reads to timeout once they have started. The 

 

messaging service will drop the request when its received on the ReadStage 

 

or RequestResponseStage. This is how its always operated so not unique to 

 

3.9. If a client disconnects from a coordinator there is also no way for 

 

the replicas who received a read request from the coordinator to know that 

 

the client was disconnected. 

 

 

 

Would be an interesting JIRA but as a note, it will likely not be a quick 

 

fix. Theres internal mechanisms that don't really have a concept of a 

 

timeout and where we would want it to never timeout (ie a compaction, 

 

reading system tables to fill meta data, repairs etc) and currently theres 

 

no way of differentiating between them. 

 

 

 

Chris 

 

 

 

On Thu, Jul 13, 2017 at 10:53 PM, Vladimir Yudovin 
lt;vla...@winguzone.comgt; 

 

wrote: 

 

 

 

gt; Hi, 

 

gt; 

 

gt; 

 

gt; 

 

gt; Cassandra 3.9, I found after some ALLOW FILTERING request running on 
huge 

 

gt; partition fails with Cassandra timeout during read query at 
consistency ONE 

 

gt; (1 responses were required but only 0 replica responded) nodes 
continue to 

 

gt; consume CPU in ReadStage-N threads, as if they still performing search 

 

gt; despite failed request and even disconnected client. 

 

gt; 

 

gt; 

 

gt; 

 

gt; Is it something known or probably it's worth JIRA filling? 

 

gt; 

 

gt; 

 

gt; 

 

gt; 

 

gt; 

 

gt; Best regards, Vladimir Yudovin, 

 

gt; 

 

gt; Winguzone - Cloud Cassandra Hosting 

 

gt; 

 

gt; 

 

gt; 

 

gt; 

 

gt; 

 

gt; 

 

 

 

 

 

 








Re: High CPU after read timeout

2017-07-14 Thread Vladimir Yudovin
 If a client disconnects from a coordinator there is also no way for the 
replicas to know that the client was disconnected.

Got it.



 Theres internal mechanisms that don't really have a concept of atimeout 
and where we would want it to never timeout

Can such timeout be passed to executing thread? For read requests it can be 
taken from xxx_equest_timeout_in_ms parameters.

Because now one bad SELECT can put nodes in high load for very long time, and 
actually paralyze cluster in certain situations. 





Best regards, Vladimir Yudovin, 

Winguzone - Cloud Cassandra Hosting






 On Fri, 14 Jul 2017 00:57:14 -0400 Chris Lohfink 
clohfin...@gmail.com wrote 




There is no mechanism for reads to timeout once they have started. The 

messaging service will drop the request when its received on the ReadStage 

or RequestResponseStage. This is how its always operated so not unique to 

3.9. If a client disconnects from a coordinator there is also no way for 

the replicas who received a read request from the coordinator to know that 

the client was disconnected. 

 

Would be an interesting JIRA but as a note, it will likely not be a quick 

fix. Theres internal mechanisms that don't really have a concept of a 

timeout and where we would want it to never timeout (ie a compaction, 

reading system tables to fill meta data, repairs etc) and currently theres 

no way of differentiating between them. 

 

Chris 

 

On Thu, Jul 13, 2017 at 10:53 PM, Vladimir Yudovin vla...@winguzone.com 

wrote: 

 

 Hi, 

 

 

 

 Cassandra 3.9, I found after some ALLOW FILTERING request running on huge 

 partition fails with Cassandra timeout during read query at consistency 
ONE 

 (1 responses were required but only 0 replica responded) nodes continue to 

 consume CPU in ReadStage-N threads, as if they still performing search 

 despite failed request and even disconnected client. 

 

 

 

 Is it something known or probably it's worth JIRA filling? 

 

 

 

 

 

 Best regards, Vladimir Yudovin, 

 

 Winguzone - Cloud Cassandra Hosting 

 

 

 

 

 

 








Patches for CASSANDRA-12971 and CASSANDRA-12972 submitted

2017-07-14 Thread Vladimir Yudovin
Hi All,

please review.



Thanks.



Best regards, Vladimir Yudovin, 

Winguzone - Cloud Cassandra Hosting







High CPU after read timeout

2017-07-13 Thread Vladimir Yudovin
Hi,



Cassandra 3.9, I found after some ALLOW FILTERING request running on huge 
partition fails with Cassandra timeout during read query at consistency ONE (1 
responses were required but only 0 replica responded) nodes continue to consume 
CPU in ReadStage-N threads, as if they still performing search despite failed 
request and even disconnected client.



 Is it something known or probably it's worth JIRA filling?





Best regards, Vladimir Yudovin, 

Winguzone - Cloud Cassandra Hosting







Re: Configurable password policy in Cassandra...

2016-12-23 Thread Vladimir Yudovin
Hi,



actually Cassandra is not public  service like e-mail or social network. It's 
admin responsibility to create strong super password, and if there is front-end 
application allowing to users setting password such application can force 
password requirements.



Best regards, Vladimir Yudovin, 

Winguzone - Cloud Cassandra Hosting






 On Fri, 23 Dec 2016 12:05:40 -0500 Prakash Chauhan 
prakash.chau...@ericsson.com wrote 




Hello All, 

 

In Apache Cassandra , there are no strict password policies for creating a new 
user. 

 

A new user can be created with a password as simple as "abc" which is not at 
all recommended for production use. 

Moreover the same password can be used again and again. 

 

There should be a configurable password policy in Cassandra for creating new 
users. 

 

Any thoughts on this  

 

 

 

Regards, 

Prakash Chauhan. 








Re: How do data model a recursive message in Cassandra

2016-12-22 Thread Vladimir Yudovin
Hi,



it's better to send such questions to user list, not dev.



Best regards, Vladimir Yudovin, 

Winguzone - Cloud Cassandra Hosting






 On Wed, 21 Dec 2016 17:25:07 -0500 shyla deshpande 
deshpandesh...@gmail.com wrote 




Hi All, 

 

The protobuf message 'sessionproto' that I receive has a field that is 

recursive. How do I define a data model in Cassandra to store this 

data. itemrelationproto 

references itemgroupproto and itemgroupproto references itemrelationproto . 

Thanks. 

 

message itemrelationproto { 

 

 optional string id = 1; 

 

 optional itemgroupproto itemgroup = 2; 

 

} 

 

 

 

message itemgroupproto { 

 

 optional string id = 1; 

 

 optional string displayname = 2; 

 

 repeated itemrelationproto itemrelations = 3; 

 

} 

 

 

 

message sessionproto { 

 

 optional string sessionid = 1; 

 

 optional string displayname = 3; 

 

 repeated itemrelationproto itemrelations = 4; 

 

} 

 

 

create type itemrelationproto ( 

 

 id text, 

 

 itemgroup frozenitemgroupproto 

 

); 

 

 

 

create type itemgroupproto ( 

 

 id text, 

 

 displayname text, 

 

 itemrelations setfrozenitemrelationproto 

 

); 

 

 

 

create table sessionproto ( 

 

 sessionid text, 

 

 displayname text, 

 

 itemrelations setfrozenitemrelationproto, 

 

 primary key (sessionid) 

 

); 








Re: CASSANDRA-8596

2016-11-29 Thread Vladimir Yudovin
 On Tue, 29 Nov 2016 03:55:15 -0500 Benjamin Lerer 
benjamin.le...@datastax.com wrote 

It also seems that the ticket has never been marked as patch available

Yes, as it still was under discussion that never was finished. 





Best regards, Vladimir Yudovin, 

Winguzone - Cloud Cassandra Hosting






 On Tue, 29 Nov 2016 03:55:15 -0500 Benjamin Lerer 
benjamin.le...@datastax.com wrote 




Hi Vladimir, 

 

It also seems that the ticket has never been marked as patch available and 

that you did not assign yourself to it. Most of us look at those to 

determine in which state is a ticket. 

 

On Tue, Nov 29, 2016 at 9:42 AM, Jeff Jirsa jji...@gmail.com wrote: 

 

 Hey Vladimir 

 

 Always nice to see patches, and pinging this list is a good way to draw 

 attention to them if they go idle 

 

 Looks like it stalled because Brandon recommended two changes and you 

 addressed one but not the other - Brandon may have more feedback, he's 
very 

 familiar with that part of the codebase. 

 

 These days, it'd also be nice to see a unit test (or dtest) to demonstrate 

 that the patch corrects the issue properly - that not only proves 

 correctness, but better protects us in the future in case someone tries to 

 alter the schema of system.peers in an incompatible way. 

 

 

 

 -- 

 Jeff Jirsa 

 

 

  On Nov 29, 2016, at 12:19 AM, Vladimir Yudovin 
vla...@winguzone.com 

 wrote: 

  

  Hi, 

  

  

  

  in the light of broader community involvement I would like to bring 

 attentions to the https://issues.apache.org/jira/browse/CASSANDRA-8596 I 

 open with proposed patch. 

  

  It's stuck for almost 1.5 years. 

  

  

  

  I would like to help with Cassandra development and improvement, and 
I 

 have several other fixes, some has JIRA, some not. 

  

  

  

  Best regards, Vladimir Yudovin, 

  

  Winguzone - Cloud Cassandra Hosting 

  

  

  

  

  

 








Re: CASSANDRA-8596

2016-11-29 Thread Vladimir Yudovin
Hi guys, thanks for answer!



Actually the last activity on this ticket was my question 

Does this issue exist with other snitches? How can they benefit from my 
solution?




Also before working on ticked or prepare patch it's good to know if it's needed 
at all. ;-)

Look at https://issues.apache.org/jira/browse/CASSANDRA-8945 It was Resolved to 
"Not A Problem" without any discussion.



We made this and other fixes in our own Cassandra build, but if things are 
silently denied obviously it's not stimulate donation and participation, as it 
takes more time and energy than just to fix it for us only.



Best regards, Vladimir Yudovin, 

Winguzone - Cloud Cassandra Hosting






 On Tue, 29 Nov 2016 03:45:59 -0500 Oleksandr Petrov 
oleksandr.pet...@gmail.com wrote 




I would recommend several things that could help this (and probably many 

other patches that accidentally went under radar) to get accepted. It's 

hard to keep an enormous amount of issues in memory, so we try to rely on 

simple rules that help everyone to see current status and understand what 

to do next with the ticket: 

 

 * if you are planning to work on ticket, assign it to yourself. 

Sometimes it's also good to comment on it (if there was previous activity), 

as someone else might be already working on it but forgot to mention it or 

assign it. Doesn't happen often though. 

 * If you're working on it, put it into "work in progress" status. 

 * If you have finished working on the patch and think it's ready for 

review, put it into "ready for review" state. 

 * (bonus) ping someone on cassandra-dev IRC channel to get your patch 

submitted for CI. Most of time however, this will be done by reviewer 

anyways. But having a passing build is always reassuring. 

 

I know that committers (and active contributors) are frequently reviewing 

"ready for review" tickets and try to provide feedback. Relying only on 

ticket comments is a bit hard, since it's too easy to lose track of them. 

 

Sometimes it's possible that the next person who can review the ticket will 

only have time in a couple of weeks. Everyone does their best. But if you 

feel that it went forgotten, just leave another comment. 

 

Hope this helps! 

 

On Tue, Nov 29, 2016 at 9:19 AM Vladimir Yudovin vla...@winguzone.com 

wrote: 

 

 Hi, 

 

 

 

 in the light of broader community involvement I would like to bring 

 attentions to the https://issues.apache.org/jira/browse/CASSANDRA-8596 I 

 open with proposed patch. 

 

 It's stuck for almost 1.5 years. 

 

 

 

 I would like to help with Cassandra development and improvement, and I 

 have several other fixes, some has JIRA, some not. 

 

 

 

 Best regards, Vladimir Yudovin, 

 

 Winguzone - Cloud Cassandra Hosting 

 

 

 

 

 

 -- 

Alex Petrov 








Re: Cassandra Mutation object decoding

2016-11-19 Thread Vladimir Yudovin
Hi Sanal,



do we have metadata inside Mutation object to decode whether the CQL was an 
INSERT or UPDATE operation?

I'm not sure it's possible to distinguish them - both of them just add data to 
SSTable.





Best regards, Vladimir Yudovin, 

Winguzone - Hosted Cloud Cassandra
Launch your cluster in minutes.





 On Fri, 18 Nov 2016 15:55:00 -0500Sanal Vasudevan 
get2sa...@gmail.com wrote 




Hi there, 

 

I am trying to read the Commit logs to decode the original CQL which used. 

I get to the point an implemention of CommitLogReadHandler is able to push 

back Mutation objects from the Commit logs. 

 

Questions: 

1) CQL: delete from myks.mytable where key1 = 1; 

For the above CQL, the Mutation object has zero objects of 

org.apache.cassandra.db.rows.Row inside ParitionUpdate object. 

Is this the only way to detect a DELETE operation? or we have any other 

metadata to indicate a DELETE operation? 

 mutation.getPartitionUpdates().forEach(rows - { if(rows.isEmpty()) 

System.out.println("May be a DELETE operation") }); 

2) Likewise do we have metadata inside Mutation object to decode whether 

the CQL was an INSERT or UPDATE operation? 

 

Josh Mckenzie indicated that PartitionUpdate.deletionInfo 

(MutableDeletionInfo) may have some information but deletionInfo is private. 

 

Basically, I am looking for help to find a way to classify Mutation object 

to INSERT/UPDATE/DELETE with related column and key information. 

 

Many thanks. 

-- 

Sanal 








Wiki edit

2016-11-06 Thread Vladimir Yudovin
Please add user winguzone to Wiki,



thanks



Best regards, Vladimir Yudovin, 

Winguzone - Hosted Cloud Cassandra
Launch your cluster in minutes.






Re: Proprietary Replication Strategies: Cassandra Driver Support

2016-10-08 Thread Vladimir Yudovin
Well, it can be useful in some scenarios - e.g. temporary tables on nearest or 
the same node.

Best regards, Vladimir Yudovin, 
Winguzone - Hosted Cloud Cassandra on Azure and SoftLayer.
Launch your cluster in minutes.




 On Sat, 08 Oct 2016 13:44:00 -0400 Jeff Jirsajji...@gmail.com 
wrote  

I'm sure that's what he meant, I just disagree that it sounds useful 
 
-- 
Jeff Jirsa 
 
 
 On Oct 8, 2016, at 10:33 AM, Vladimir Yudovin vla...@winguzone.com 
wrote: 
 
 As far as I understand Edward meant to have option determinate actual 
storage node on client side, by driver, disregarding key hash/tokens mechanism. 
 
 Best regards, Vladimir Yudovin, 
 Winguzone - Hosted Cloud Cassandra on Azure and SoftLayer. 
 Launch your cluster in minutes. 
 
 
 
 
  On Sat, 08 Oct 2016 13:17:14 -0400 Jeff Jirsa 
lt;jji...@gmail.comgt; wrote  
 
 That sounds awful, especially since you could just use SimpleStrategy with 
RF=1 and then bootstrap / decom would handle resharding for you as expected. 
 
 -- 
 Jeff Jirsa 
 
 
 gt; On Oct 8, 2016, at 10:09 AM, Edward Capriolo 
lt;edlinuxg...@gmail.comgt; wrote: 
 gt; 
 gt; I have contemplated using LocalStrategy as a "do it yourself 
client side 
 gt; sharding system". 
 gt; 
 gt; On Sat, Oct 8, 2016 at 12:37 AM, Vladimir Yudovin 
lt;vla...@winguzone.comgt; 
 gt; wrote: 
 gt; 
 gt;gt; Hi Prasenjit, 
 gt;gt; I would like to get the replication factors of the 
key-spaces using the 
 gt;gt; strategies in the same way we get the replication factors 
for Simple and 
 gt;gt; NetworkTopology. 
 gt;gt; Actually LocalSarategy has no replication factor: 
 gt;gt; 
 gt;gt; SELECT * FROM system_schema.keyspaces WHERE keyspace_name 
IN ('system', 
 gt;gt; 'system_schema'); 
 gt;gt; keyspace_name | durable_writes | replication 
 gt;gt; 
---++--- 
 gt;gt; - 
 gt;gt; system | True | {'class': 
 gt;gt; 'org.apache.cassandra.locator.LocalStrategy'} 
 gt;gt; system_schema | True | {'class': 
 gt;gt; 'org.apache.cassandra.locator.LocalStrategy'} 
 gt;gt; 
 gt;gt; 
 gt;gt; It's used for internal tables and not accessible to 
users: 
 gt;gt; 
 gt;gt; CREATE KEYSPACE excel WITH replication = {'class': 
'LocalStrategy'}; 
 gt;gt; ConfigurationException: Unable to use given strategy 
class: LocalStrategy 
 gt;gt; is reserved for internal use. 
 gt;gt; 
 gt;gt; 
 gt;gt; Best regards, Vladimir Yudovin, 
 gt;gt; Winguzone - Hosted Cloud Cassandra on Azure and 
SoftLayer. 
 gt;gt; Launch your cluster in minutes. 
 gt;gt; 
 gt;gt; 
 gt;gt; 
 gt;gt; 
 gt;gt;  On Fri, 07 Oct 2016 17:06:09 -0400 Prasenjit 
 gt;gt; Sarkaramp;lt;prasenjit.sar...@datos.ioamp;gt; 
wrote  
 gt;gt; 
 gt;gt; Thanks Vlad and Jeremiah. 
 gt;gt; 
 gt;gt; There were questions about support, so let me address 
that in more detail. 
 gt;gt; 
 gt;gt; If I look at the latest Cassandra python driver, the 
support for 
 gt;gt; LocalStrategy is very limited (code snippet shown below) 
and the support 
 gt;gt; for EverywhereStrategy is non-existent. By limited I mean 
that the 
 gt;gt; Cassandra python driver only provides the name of the 
strategy for 
 gt;gt; LocalStrategy and not much else. 
 gt;gt; 
 gt;gt; What I would like (and happy to help) is for the 
Cassandra python driver to 
 gt;gt; provide support for Local and Everywhere to the same 
extent it is provided 
 gt;gt; for Simple and NetworkTopology. I understand that token 
aware routing is 
 gt;gt; not applicable to either strategy but I would like to get 
the replication 
 gt;gt; factors of the key-spaces using the strategies in the 
same way we get the 
 gt;gt; replication factors for Simple and NetworkTopology. 
 gt;gt; 
 gt;gt; Hope this helps, 
 gt;gt; Prasenjit 
 gt;gt; 
 gt;gt; 
 gt;gt; class LocalStrategy(ReplicationStrategy): 
 gt;gt; def __init__(self, options_map): 
 gt;gt; pass 
 gt;gt; def make_token_replica_map(self, token_to_host_owner, 
ring): 
 gt;gt; return {} 
 gt;gt; def export_for_schema(self): 
 gt;gt; """ 
 gt;gt; Returns a string version of these replication options 
which are 
 gt;gt; suitable for use in a CREATE KEYSPACE statement. 
 gt;gt; """ 
 gt;gt; return "{'class': 'LocalStrategy'}" 
 gt;gt; def __eq__(self, other): 
 gt;gt; return isinstance(other, LocalStrategy) 
 gt;gt; 
 gt;gt; On Fri, Oct 7, 2016 at 11:56 AM, Jeremiah D Jordan 
amp;lt; 
 gt;gt; jeremiah.jor...@gmail.comamp;gt; wrote: 
 gt;gt; 
 gt;gt; amp;gt; What kind of support are you thinking of? 
All drivers should support 
 gt;gt; them 
 gt;gt; amp;gt; already, drivers shouldn’t care about 
replication strategy except when 
 gt;gt; amp;gt; trying to do token aware routing. 
 gt;gt; amp;gt; But since anyone can make a custom 
replication strategy, drivers that 
 gt;gt; do 
 gt;gt; amp;gt; token aware routing just need to handle 
falling back to not doing 
 gt;gt; token 
 gt;gt; amp;gt; aware routing if a replication strategy 

Re: Re: Proprietary Replication Strategies: Cassandra Driver Support

2016-10-08 Thread Vladimir Yudovin
As far as I understand Edward meant to have option determinate actual storage 
node on client side, by driver, disregarding key hash/tokens mechanism.

Best regards, Vladimir Yudovin, 
Winguzone - Hosted Cloud Cassandra on Azure and SoftLayer.
Launch your cluster in minutes.




 On Sat, 08 Oct 2016 13:17:14 -0400 Jeff Jirsa jji...@gmail.com 
wrote  

That sounds awful, especially since you could just use SimpleStrategy with RF=1 
and then bootstrap / decom would handle resharding for you as expected. 
 
-- 
Jeff Jirsa 
 
 
 On Oct 8, 2016, at 10:09 AM, Edward Capriolo edlinuxg...@gmail.com 
wrote: 
 
 I have contemplated using LocalStrategy as a "do it yourself client side 
 sharding system". 
 
 On Sat, Oct 8, 2016 at 12:37 AM, Vladimir Yudovin 
vla...@winguzone.com 
 wrote: 
 
 Hi Prasenjit, 
 I would like to get the replication factors of the key-spaces using 
the 
 strategies in the same way we get the replication factors for Simple 
and 
 NetworkTopology. 
 Actually LocalSarategy has no replication factor: 
 
 SELECT * FROM system_schema.keyspaces WHERE keyspace_name IN 
('system', 
 'system_schema'); 
 keyspace_name | durable_writes | replication 
 ---++--- 
 - 
 system | True | {'class': 
 'org.apache.cassandra.locator.LocalStrategy'} 
 system_schema | True | {'class': 
 'org.apache.cassandra.locator.LocalStrategy'} 
 
 
 It's used for internal tables and not accessible to users: 
 
 CREATE KEYSPACE excel WITH replication = {'class': 'LocalStrategy'}; 
 ConfigurationException: Unable to use given strategy class: 
LocalStrategy 
 is reserved for internal use. 
 
 
 Best regards, Vladimir Yudovin, 
 Winguzone - Hosted Cloud Cassandra on Azure and SoftLayer. 
 Launch your cluster in minutes. 
 
 
 
 
  On Fri, 07 Oct 2016 17:06:09 -0400 Prasenjit 
 Sarkarlt;prasenjit.sar...@datos.iogt; wrote  
 
 Thanks Vlad and Jeremiah. 
 
 There were questions about support, so let me address that in more 
detail. 
 
 If I look at the latest Cassandra python driver, the support for 
 LocalStrategy is very limited (code snippet shown below) and the 
support 
 for EverywhereStrategy is non-existent. By limited I mean that the 
 Cassandra python driver only provides the name of the strategy for 
 LocalStrategy and not much else. 
 
 What I would like (and happy to help) is for the Cassandra python 
driver to 
 provide support for Local and Everywhere to the same extent it is 
provided 
 for Simple and NetworkTopology. I understand that token aware routing 
is 
 not applicable to either strategy but I would like to get the 
replication 
 factors of the key-spaces using the strategies in the same way we get 
the 
 replication factors for Simple and NetworkTopology. 
 
 Hope this helps, 
 Prasenjit 
 
 
 class LocalStrategy(ReplicationStrategy): 
 def __init__(self, options_map): 
 pass 
 def make_token_replica_map(self, token_to_host_owner, ring): 
 return {} 
 def export_for_schema(self): 
 """ 
 Returns a string version of these replication options which are 
 suitable for use in a CREATE KEYSPACE statement. 
 """ 
 return "{'class': 'LocalStrategy'}" 
 def __eq__(self, other): 
 return isinstance(other, LocalStrategy) 
 
 On Fri, Oct 7, 2016 at 11:56 AM, Jeremiah D Jordan lt; 
 jeremiah.jor...@gmail.comgt; wrote: 
 
 gt; What kind of support are you thinking of? All drivers should 
support 
 them 
 gt; already, drivers shouldn’t care about replication strategy 
except when 
 gt; trying to do token aware routing. 
 gt; But since anyone can make a custom replication strategy, 
drivers that 
 do 
 gt; token aware routing just need to handle falling back to not 
doing 
 token 
 gt; aware routing if a replication strategy they don’t know about 
is in 
 use. 
 gt; All the open sources drivers I know of do this, so they 
should all 
 gt; “support” those strategies already. 
 gt; 
 gt; -Jeremiah 
 gt; 
 gt; gt; On Oct 7, 2016, at 1:02 PM, Prasenjit Sarkar  
 lt;prasenjit.sar...@datos.iogt; 
 gt; wrote: 
 gt; gt; 
 gt; gt; Hi everyone, 
 gt; gt; 
 gt; gt; To the best of my understanding that Datastax has 
proprietary 
 replication 
 gt; gt; strategies: Local and Everywhere which are not part 
of the open 
 source 
 gt; gt; Apache Cassandra project. 
 gt; gt; 
 gt; gt; Do we know of any plans in the open source Cassandra 
driver 
 community to 
 gt; gt; support these two replication strategies? Would 
Datastax have a 
 licensing 
 gt; gt; concern if the open source driver community 
supported these 
 strategies? 
 gt; I'm 
 gt; gt; fairly new here and would like to understand the 
dynamics. 
 gt; gt; 
 gt; gt; Thanks, 
 gt; gt; Prasenjit 
 gt; 
 gt; 
 
 
 
 
 
 







Re: Proprietary Replication Strategies: Cassandra Driver Support

2016-10-07 Thread Vladimir Yudovin
Hi Prasenjit,
I would like to get the replication factors of the key-spaces using the 
strategies in the same way we get the replication factors for Simple and 
NetworkTopology. 
 Actually LocalSarategy has no replication factor:

SELECT * FROM system_schema.keyspaces WHERE keyspace_name IN ('system', 
'system_schema');
 keyspace_name | durable_writes | replication 
---++
system   | True | {'class': 
'org.apache.cassandra.locator.LocalStrategy'}
 system_schema | True | {'class': 
'org.apache.cassandra.locator.LocalStrategy'}


It's used for internal tables and not accessible to users:

CREATE KEYSPACE excel WITH replication = {'class': 'LocalStrategy'};
ConfigurationException: Unable to use given strategy class: LocalStrategy is 
reserved for internal use.


Best regards, Vladimir Yudovin, 
Winguzone - Hosted Cloud Cassandra on Azure and SoftLayer.
Launch your cluster in minutes.




 On Fri, 07 Oct 2016 17:06:09 -0400 Prasenjit 
Sarkarprasenjit.sar...@datos.io wrote  

Thanks Vlad and Jeremiah. 
 
There were questions about support, so let me address that in more detail. 
 
If I look at the latest Cassandra python driver, the support for 
LocalStrategy is very limited (code snippet shown below) and the support 
for EverywhereStrategy is non-existent. By limited I mean that the 
Cassandra python driver only provides the name of the strategy for 
LocalStrategy and not much else. 
 
What I would like (and happy to help) is for the Cassandra python driver to 
provide support for Local and Everywhere to the same extent it is provided 
for Simple and NetworkTopology. I understand that token aware routing is 
not applicable to either strategy but I would like to get the replication 
factors of the key-spaces using the strategies in the same way we get the 
replication factors for Simple and NetworkTopology. 
 
Hope this helps, 
Prasenjit 
 
 
class LocalStrategy(ReplicationStrategy): 
def __init__(self, options_map): 
pass 
def make_token_replica_map(self, token_to_host_owner, ring): 
return {} 
def export_for_schema(self): 
""" 
Returns a string version of these replication options which are 
suitable for use in a CREATE KEYSPACE statement. 
""" 
return "{'class': 'LocalStrategy'}" 
def __eq__(self, other): 
return isinstance(other, LocalStrategy) 
 
On Fri, Oct 7, 2016 at 11:56 AM, Jeremiah D Jordan  
jeremiah.jor...@gmail.com wrote: 
 
 What kind of support are you thinking of? All drivers should support them 
 already, drivers shouldn’t care about replication strategy except when 
 trying to do token aware routing. 
 But since anyone can make a custom replication strategy, drivers that do 
 token aware routing just need to handle falling back to not doing token 
 aware routing if a replication strategy they don’t know about is in use. 
 All the open sources drivers I know of do this, so they should all 
 “support” those strategies already. 
 
 -Jeremiah 
 
  On Oct 7, 2016, at 1:02 PM, Prasenjit Sarkar 
prasenjit.sar...@datos.io 
 wrote: 
  
  Hi everyone, 
  
  To the best of my understanding that Datastax has proprietary 
replication 
  strategies: Local and Everywhere which are not part of the open 
source 
  Apache Cassandra project. 
  
  Do we know of any plans in the open source Cassandra driver community 
to 
  support these two replication strategies? Would Datastax have a 
licensing 
  concern if the open source driver community supported these 
strategies? 
 I'm 
  fairly new here and would like to understand the dynamics. 
  
  Thanks, 
  Prasenjit 
 
 







Re: Proprietary Replication Strategies: Cassandra Driver Support

2016-10-07 Thread Vladimir Yudovin
Do you mean org.apache.cassandra.locator.LocalStrategy?
If yes it's standard Cassandra strategy use for system and system_schema 
keyspaces.

Best regards, Vladimir Yudovin, 
Winguzone - Hosted Cloud Cassandra on Azure and SoftLayer.
Launch your cluster in minutes.




 On Fri, 07 Oct 2016 14:02:07 -0400 Prasenjit Sarkar 
prasenjit.sar...@datos.io wrote  

Hi everyone, 
 
To the best of my understanding that Datastax has proprietary replication 
strategies: Local and Everywhere which are not part of the open source 
Apache Cassandra project. 
 
Do we know of any plans in the open source Cassandra driver community to 
support these two replication strategies? Would Datastax have a licensing 
concern if the open source driver community supported these strategies? I'm 
fairly new here and would like to understand the dynamics. 
 
Thanks, 
Prasenjit