Re: Cassandra listen port

2016-10-04 Thread Mehdi Bada
Be sure, it's for. Test :))) But I just don't want to use ccm. I want to test it manually (manual configuration) for a good understanding. Thnks Vladimir --- Mehdi Bada | Consultant Phone: +41 32 422 96 00 | Mobile: +41 79 928 75 48 | Fax: +41 32 499 96 15 dbi services, Rue de la

Re: Re: Cassandra listen port

2016-10-04 Thread Vladimir Yudovin
I hope it's not for production ))) Yes, you need three IP (real or aliases). There is Cassandra Cluster Manager tool for launching several C* on the same host. See also https://academy.datastax.com/getting-started-with-ccm-cassandra-cluster-manager and

Re: How to write a trigger in Cassandra to only detect updates of an existing row?

2016-10-04 Thread Kant Kodali
Hi Siddharth, That seems like a cool trick. but since I am looking for only updates of an existing row how would I know from this logic "insert/update(length > 0)" do I need to create a hashmap for every row and keep track oflength > 0 but that would blow up the memory right. Thanks,kant On

Re: nodetool cfhistograms

2016-10-04 Thread Sungju Hong
Sorry, I had a typing error. nodetool cfhistograms ouput shows like below. ks1/cf1 histograms Offset SSTables Write Latency Read Latency Row Size Column Count 1 0 0 0 0 35565129 2

nodetool cfhistograms

2016-10-04 Thread Sungju Hong
Hello, nodetool cfhistograms ouput shows like below. ks1/cf1 histograms Offset SSTables Write Latency Read Latency Row Size Column Count 1 0 0 0 0 35565129 2 0

Re: How to write a trigger in Cassandra to only detect updates of an existing row?

2016-10-04 Thread siddharth verma
Hi, consider the schema pk1 text, ck1 text v1 text, v2 text. PRIMARY KEY(pk1,ck1) 1. insert into ks.tablename(pk1,ck1,v1,v2) values('PK1,'CK1','a','a'); 2. delete from ks.tablename where pk1='PK2' and ck1='CK2'; 3. insert into ks.tablename(pk1,ck1) values('PK3,'CK3'); 4. insert into

Re: How to query '%' character using LIKE operator in Cassandra 3.7?

2016-10-04 Thread Mikhail Krupitskiy
Please see my comments inline. Thanks, Mikhail > On 26 Sep 2016, at 17:07, DuyHai Doan wrote: > > "In the current implementation (‘%’ could be a wildcard only at the start/end > of a term) I guess it should be ’ENDS with ‘%escape’ ‘." > > --> Yes in the current impl, it

Re: How to write a trigger in Cassandra to only detect updates of an existing row?

2016-10-04 Thread Kant Kodali
Hi Siddharth, I don't quite follow the assumption "If you are sure that your application will NOT do an insert of the form when ONLY primary key values are specified, you can check the length of next, to indicate whether it is an insert/update(where atleast one non primary key column value is

Re: Cassandra listen port

2016-10-04 Thread Mehdi Bada
I want to run a cluster (3 instances) in a single server. Configuration of my VM: - host-only adapter: static IP 192.168... - bridge adapter I create 3 environments (data dir, admin dir, conf file...) for the 3 instances. But I'm now blocked in the network configuration. I can use 1 IP

Re: How to write a trigger in Cassandra to only detect updates of an existing row?

2016-10-04 Thread siddharth verma
Hi, I am not sure whether it will help you or not. Code snippet : public Collection augment(Partition update) { ... StringBuilder next=new StringBuilder(); SearchIterator searchIterator = update.searchIterator(ColumnFilter.all(update.metadata()),false);

Re: Re: Cassandra listen port

2016-10-04 Thread Vladimir Yudovin
Use multiple IP addresses instead. Virtual addresses can be possible also? eth0:0, eth0:1 Why multiple or virtual IP? You can use the same IP for both addresses, as they use different TCP ports. Sure, it's better to use internal IP (like 10... or 192.168...) for internode connect, but it's

Re: Cassandra listen port

2016-10-04 Thread Benjamin Roth
Of course, just add aliases to your interfaces (like eth0:0, eth0:1, ...). For example CCM (https://github.com/pcmanus/ccm) uses 127.0.0.[1-255] to set up multiple CS instances on a single server. 2016-10-04 20:49 GMT+02:00 Mehdi Bada : > Virtual addresses can be

Re: How to write a trigger in Cassandra to only detect updates of an existing row?

2016-10-04 Thread Kant Kodali
Thanks a lot, This helps me to make a decision on not to write one for the performance reasons you pointed out! On Tue, Oct 4, 2016 11:42 AM, Eric Stevens migh...@gmail.com wrote: You would have to perform a SELECT on the row in the trigger code in order to determine if there was underlying

Re: Cassandra listen port

2016-10-04 Thread Mehdi Bada
Virtual addresses can be possible also? Thanks Benjamin Mehdi Bada | Consultant Phone: +41 32 422 96 00 | Mobile: +41 79 928 75 48 | Fax: +41 32 422 96 15 dbi services, Rue de la Jeunesse 2, CH-2800 Delémont mehdi.b...@dbi-services.com www.dbi-services.com ⇒ dbi services is recruiting Oracle

Re: Re: Cassandra listen port

2016-10-04 Thread Vladimir Yudovin
9000 CQL port?? Do you mean 9042? There are two address/ports - one is listen (internode communication) and second is CQL (rpc in YAML terms). Look at YAML explanation on listen_address and rpc_address Actual configuration depends on how many network card each node have, is it NAT or not,

Re: How to write a trigger in Cassandra to only detect updates of an existing row?

2016-10-04 Thread Eric Stevens
You would have to perform a SELECT on the row in the trigger code in order to determine if there was underlying data. Cassandra is in essence an append-only data store, when an INSERT or UPDATE is executed, it has no idea if there is already a row underlying it, and for write performance reasons

Re: Cassandra listen port

2016-10-04 Thread Benjamin Roth
As far as I can see, these ports are also used for outgoing connection, so a node expects all other peers also to use that port. Therefore the answer is no. Use multiple IP addresses instead. 2016-10-04 20:03 GMT+02:00 Mehdi Bada : > Thanks Vladimir. > It means if I

How to write a trigger in Cassandra to only detect updates of an existing row?

2016-10-04 Thread Kant Kodali
Hi all, How to write a trigger in Cassandra to detect updates? My requirement is that I want a trigger to alert me only when there is an update to an existing row and looks like given the way INSERT and Update works this might be hard to do because INSERT will just overwrite if there is an

Re: Cassandra listen port

2016-10-04 Thread Mehdi Bada
Thanks Vladimir. It means if I want to run Cassandra on multi instance environment I only have to change the listen address of each instance and the 9000 CQL port?? --- Mehdi Bada | Consultant Phone: +41 32 422 96 00 | Mobile: +41 79 928 75 48 | Fax: +41 32 422 96 15 dbi services, Rue de la

Re: Tombstoned error and then OOM

2016-10-04 Thread INDRANIL BASU
The query has a where clause on a column which is a secondary index in the column family.E.g select * from test_schema.test_cf where status = 0; Here the status is integer column which is indexed.  -- IB From: kurt Greaves To: user@cassandra.apache.org; INDRANIL

Re: Efficient model for a sorting

2016-10-04 Thread Benjamin Roth
I started off with 3.0.6 and for my personal use case(s) they had the same bugs as tick tock. 2016-10-04 19:03 GMT+02:00 Jonathan Haddad : > I strongly recommend avoiding tick tock. You'll be one of the only people > putting it in prod and will likely hit a number of weird

Re: Tombstoned error and then OOM

2016-10-04 Thread kurt Greaves
This sounds like you're running a query that consumes a lot of memory. Are you by chance querying a very large partition or not bounding your query? I'd also recommend upgrading to 2.1.15, 2.1.0 is very old and has quite a few bugs. On 3 October 2016 at 17:08, INDRANIL BASU

Re: Efficient model for a sorting

2016-10-04 Thread Jonathan Haddad
I strongly recommend avoiding tick tock. You'll be one of the only people putting it in prod and will likely hit a number of weird issues nobody will be able to help you with. On Tue, Oct 4, 2016 at 12:40 PM Benjamin Roth wrote: > I have the impression, that not the

Re: Efficient model for a sorting

2016-10-04 Thread Benjamin Roth
I have the impression, that not the tick-tock is the real problem but MVs are not really battle-tested yet. Depending on the model, they put much more complexity on a cluster and it's behaviour under heavy load. Especially if you are going to create an MV with a different partition key than the

Re: when taking backups using snapshot if the sstable gets compacted will nodetool snapshot hung ??

2016-10-04 Thread Vladimir Yudovin
Hi James! Hai we are taking backups using nodetool snapshots but i occasionally see that my script pauses while taking a snapshot of a CF, is this because when it is taking snapshot does the sstables got compacted to a different one so it couldn't find that particular sstable on which it is

Re: Efficient model for a sorting

2016-10-04 Thread Vladimir Yudovin
Would you consider 3.0.x to be more stable than 3.x? I guess yes, but there are some discussion on this list: (C)* stable version after 3.5 Upgrade from 3.0.6 to 3.7. It seems to be eternal topic till tick-tock approach stabilizes. Best regards, Vladimir Yudovin, Winguzone Inc - Hosted

Re: Efficient model for a sorting

2016-10-04 Thread Benjamin Roth
I use the self-compiled master (3.10, ticktock). I had to fix a severe bug on my own and decided to go with the latest code. Would you consider 3.0.x to be more stable than 3.x? 2016-10-04 18:14 GMT+02:00 Vladimir Yudovin : > Hi Benjamin! > > >we now use CS 3.x and have

Re: Cassandra listen port

2016-10-04 Thread Vladimir Yudovin
Actually the main port is 9042 - for client (CQL) connections and 7000 (7001 if SSL enabled) for inter node communications. Best regards, Vladimir Yudovin, Winguzone Inc - Hosted Cloud Cassandra on Azure and SoftLayer. Launch your cluster in minutes. On Tue, 04 Oct 2016 11:36:04 -0400

Re: Efficient model for a sorting

2016-10-04 Thread Vladimir Yudovin
Hi Benjamin! we now use CS 3.x and have been advised that 3.x is still not considered really production ready. Did you consider using of 3.0.9? Actually it's 3.0 with almost an year fixes. Best regards, Vladimir Yudovin, Winguzone Inc - Hosted Cloud Cassandra on Azure and SoftLayer. Launch

Re: Cassandra listen port

2016-10-04 Thread Benjamin Roth
There are several ports for several services. They are all set in cassandra.yaml See here for complete documentation: https://docs.datastax.com/en/cassandra/2.1/cassandra/configuration/configCassandra_yaml_r.html 2016-10-04 16:54 GMT+02:00 Mehdi Bada : > Hi all, > >

Cassandra listen port

2016-10-04 Thread Mehdi Bada
Hi all, What is the listen port parameter for Apache Cassandra? Does it exist? In comparison with MongoDB, in mongo it's possible to set the listen port in the mongod.conf (configuration file) Regards Mehdi Mehdi Bada | Consultant Phone: +41 32 422 96 00 | Mobile: +41 79 928 75 48 | Fax:

Cassandra Ignores path to HeadDumpFile defined by cassandra-env.sh

2016-10-04 Thread Jean Carlo
Hi all, We got recently a OOM error in cassandra, and it happened that cassandra made the dump in the path defined by debian/init. However we defined the CASSANDRA_HEAPDUMP_DIR in the file /etc/default/cassandra so cassandra

Little question

2016-10-04 Thread Ruben Cardenal
Hi, We've inherited quite a big amazon infrastructure from a company we've purchased. It's has an ancient and obsolete implementation of services, being the worst (and more expensive) of all of them a 5 cluster of Cassandra (RF=3). I'm new to Cassandra, and yes, I'm doing my way throughout

Re: Repairing without -pr shows unexpected out-of-sync ranges

2016-10-04 Thread Paulo Motta
> is (2) a direct consequence of a repair on the full token range (and thus anti-compaction ran only on a subset of the RF nodes)? Not necessarily, because even with -pr enabled the nodes will be responsible for different ranges, so they will flush and compact at different instants. The effect of

Re: Efficient model for a sorting

2016-10-04 Thread DuyHai Doan
MV build is also async. In the end it's MV maintenance cost vs Lucene index maintenance cost. I don't have clear figure to judge which one is better. Maybe you should benchmark yourself. Anyway I'll be interested by the results On Tue, Oct 4, 2016 at 3:05 PM, Dorian Hoxha

Re: Efficient model for a sorting

2016-10-04 Thread Dorian Hoxha
On lucene you can query+filter+sort on a single shard, so it should be better than MV/sasi. The index building is a little async though. On Tue, Oct 4, 2016 at 2:29 PM, Benjamin Roth wrote: > Thanks guys! > > Good to know, that my approach is basically right, but I will

Re: Efficient model for a sorting

2016-10-04 Thread Benjamin Roth
Thanks guys! Good to know, that my approach is basically right, but I will check that lucene indices by time. 2016-10-04 14:22 GMT+02:00 DuyHai Doan : > "What scatter/gather? " > > http://www.slideshare.net/doanduyhai/sasi-cassandra-on- >

Re: Efficient model for a sorting

2016-10-04 Thread DuyHai Doan
"What scatter/gather? " http://www.slideshare.net/doanduyhai/sasi-cassandra-on-the-full-text-search-ride-voxxed-daybelgrade-2016/23 "If you partition your data by user_id then you query only 1 shard to get sorted by time visitors for a user" Exact, but in this case, you're using a 2nd index

Re: Efficient model for a sorting

2016-10-04 Thread Dorian Hoxha
@DuyHai What scatter/gather? If you partition your data by user_id then you query only 1 shard to get sorted by time visitors for a user. On Tue, Oct 4, 2016 at 2:09 PM, DuyHai Doan wrote: > MV is right now your best choice for this kind of sorting behavior. > > Secondary

Re: Efficient model for a sorting

2016-10-04 Thread DuyHai Doan
MV is right now your best choice for this kind of sorting behavior. Secondary index (whatever the impl, SASI or Lucene) has a cost of scatter-gather if your cluster scale out. With MV you're at least guaranteed to hit a single node everytime On Tue, Oct 4, 2016 at 1:56 PM, Dorian Hoxha

Re: Efficient model for a sorting

2016-10-04 Thread Dorian Hoxha
Can you use the lucene index https://github.com/Stratio/cassandra-lucene-index ? On Tue, Oct 4, 2016 at 1:27 PM, Benjamin Roth wrote: > Hi! > > I have a frequently used pattern which seems to be quite costly in CS. The > pattern is always the same: I have a unique key

Efficient model for a sorting

2016-10-04 Thread Benjamin Roth
Hi! I have a frequently used pattern which seems to be quite costly in CS. The pattern is always the same: I have a unique key and a sorting by a different field. To give an example, here a real life example from our model: CREATE TABLE visits.visits_in ( user_id int, user_id_visitor

Re: Cassandra data model right definition

2016-10-04 Thread Mehdi Bada
Hi all, Just to refocus the debat (because I'm the at the origin of this very interesting exchanges). I think for a good understanding of the data model of any DMBS, we have (technical experts) to decompose the data objects of the model and understand how the data is precisely stored and

Re: cassandra dump file path

2016-10-04 Thread Jean Carlo
Yes, we did it. So if the parameter in cassandra-env.sh is used only if we have a OOM, what is for the definition of *-XX:HeapDumpPath=/var/lib/cassandra/java_1475461286.hprof *in /etc/init.d/cassandra for? Saludos Jean Carlo "The best way to predict the future is to invent it" Alan Kay On