Re: how to upgrade my cassadra from SizeTieredCompaction to LeveledCompactiom
There is 2T data on each server. Can someone give me some advice? do not do it
Re: Retrieving old data version for a given row
Yes, I need this information just for academic purposes. So, to read old data values, I tried to open the Commitlog using tail -f and also the log files viewer of Ubuntu, but I can not see many informations inside of the log! Is there any other way to open this log? I didn't find any Cassandra API for this purpose. Thanks averybody in advance. Regards, Felipe Mathias Schmidt (Computer Science UFRGS, RS, Brazil) 2012/5/14 zhangcheng2 zhangche...@software.ict.ac.cn: After compaciton, the old version data will gone! zhangcheng2 From: Felipe Schmidt Date: 2012-05-14 05:33 To: user Subject: Retrieving old data version for a given row I'm trying to retrieve old data version for some row but it seems not be possible. I'm a beginner with Cassandra and the unique aproach I know is looking to the SSTable in the storage folder, but if I insert some column and right after insert another value to the same row, after flushing, I only get the last value. Is there any way to get the old data version? Obviously, before compaction. Regards, Felipe Mathias Schmidt (Computer Science UFRGS, RS, Brazil)
[ANN] Gossie, a Cassandra library for Go
Hello, I would like to introduce you to my Go Cassandra client/library, Gossie: https://github.com/carloscm/gossie My intention was to use my favorite database with my favorite language, with a library that allowed me to take advantage of idiomatic Go code with the main strengths of Cassandra. I focused on offering a smooth as possible integration with Go, including auto marshaling of most primitive built-in types and structs. I also wanted to focus on what I think is the main strength of the Cassandra data model, its column-oriented storage with ordering, which I think it is unfortunately overlooked by many people just wanting a typical key/value store. Features include: - Connection pooling to N hosts, with transparent failover and retry of queries - A low level wrapper for the Thrift interface, much easier to use than the bare Thrift bindings - Extensive type marshaling, both automatic and custom, so you can force a native integer to be serialised as a string for example - Struct mapping into Cassandra rows (or row slices), with support for both sparse and compact storage and field name/type overriding - A high level query interface that deals with structs and mappings instead of rows and column families Here is an example, using a sparse storage column family with a slice (the equivalent in the current README.md is a bit outdated): /* In CQL 3.0: CREATE TABLE Timeline ( UserID varchar, TweetID bigint, Author varchar, Body varchar, PRIMARY KEY (UserID, TweetID) ); */ // In Gossie: type Tweet struct { UserID string `cf:Timeline key:UserID cols:TweetID` TweetID int64 Author string Bodystring } pool := gossie.NewConnectionPool([]string{localhost:9160}, Example, PoolOptions{Size: 50, Timeout: 3000}) query := pool.Query(NewMapping(Tweet{})) // all tweets for a given user between TweetID 1000 and 2000 result, err := query.Between(1000, 2000).Get(username) // iterating over results for { t := Tweet{} err := result.Next(t) if err != nil { break } } Key and comparator component marshaling and positions are implicit and automatic, based on the struct mapping, making it very easy to use complex comparators. Also the sparse row support is flexible, in the sense it doesn't depend on a fixed number fields. It is able to detect a new object in the row by discontinuities in the composite values. Feedback is welcome! Thank you!
Re: live ratio counting
liveratio calc should do nothing if memtable has 0 columns. Sounds reasonable, as counting with zero columns may dramatically change the live ratio and it may take some time to be counted again. Please create a ticket on https://issues.apache.org/jira/browse/CASSANDRA liveratio calculation logic also needs to be changed because it is based on assumption that workloads do not change. Can you give an example of the sort of workload change you are thinking of ? raise maximum liveratio from 64 to at least 80. Have you seen examples in your logs where the calculated live ratio was between 64 and 80 ? Are you experiencing memory pressure you think may be attributed to memtables not being flushed frequently enough ? Cheers - Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 11/05/2012, at 12:07 AM, Radim Kolar wrote: liveratio calc should do nothing if memtable has 0 columns. I did manual flush before this. WARN [MemoryMeter:1] 2012-05-10 13:21:19,430 Memtable.java (line 181) setting live ratio to maximum of 64 instead of Infinity INFO [MemoryMeter:1] 2012-05-10 13:21:19,431 Memtable.java (line 186) CFS(Keyspace='rapidshare', ColumnFamily='resultcache') liveRatio is 64.0 (just-counted was 64.0). calculation took 1ms for 0 columns liveratio calculation logic also needs to be changed because it is based on assumption that workloads do not change. I propose to get configuration option (per node is enough) for maximum interval between liveratio calculation and raise maximum liveratio from 64 to at least 80.
Re: SSTableWriter to hdfs
Jeremy do you know the best approach here ? Cheers - Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 11/05/2012, at 1:13 AM, Shawna Qian wrote: Hi Can I use sstableunsortedwriter to write the data directly to hdfs or I have to use hdfs copyfromlocal to copy the sstable file from local dist to hdfs after they get generated? Thx Shawna Sent from my iPhone On May 7, 2012, at 3:48 AM, aaron morton aa...@thelastpickle.com wrote: Can you copy the sstables as a task after the load operation ? You should know where the files are. The are multiple files may be created by the writer during the loading process. So running code that performs a long running action will impact on the time taken to pump data through the SSTableSimpleUnsortedWriter. wrt the patch, the best place to start the conversation for this is on https://issues.apache.org/jira/browse/CASSANDRA Thanks taking the time to look into this. Cheers - Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 3/05/2012, at 11:40 PM, Benoit Perroud wrote: Hi All, I'm bulk loading (a lot of) data from Hadoop into Cassandra 1.0.x. The provided CFOutputFormat is not the best case here, I wanted to use the bulk loading feature. I know 1.1 comes with a BulkOutputFormat but I wanted to propose a simple enhancement to SSTableSimpleUnsortedWriter that could ease life : When the table is flushed into the disk, it could be interesting to have listeners that could be triggered to perform any action (copying my SSTable into HDFS for instance). Please have a look at the patch below to give a better idea. Do you think it could worth while opening a jira for this ? Regarding 1.1 BulkOutputFormat and bulk in general, the work done to have light client to stream into the cluster is really great. The issue now is that data is streamed at the end of the task only. This cause all the tasks storing the data locally and streaming everything at the end. Lot's of temporary space may be needed, and lot of bandwidth to the nodes are used at the same time. With the listener, we would be able to start streaming as soon the first table is created. That way the streaming bandwidth could be better balanced. Jira for this also ? Thanks Benoit. --- a/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java +++ b/src/java/org/apache/cassandra/io/sstable/SSTableSimpleUnsortedWriter.java @@ -21,6 +21,8 @@ package org.apache.cassandra.io.sstable; import java.io.File; import java.io.IOException; import java.nio.ByteBuffer; +import java.util.LinkedList; +import java.util.List; import java.util.Map; import java.util.TreeMap; @@ -47,6 +49,8 @@ public class SSTableSimpleUnsortedWriter extends AbstractSSTableSimpleWriter private final long bufferSize; private long currentSize; +private final ListSSTableWriterListener sSTableWrittenListeners = new LinkedListSSTableWriterListener(); + /** * Create a new buffering writer. * @param directory the directory where to write the sstables @@ -123,5 +127,16 @@ public class SSTableSimpleUnsortedWriter extends AbstractSSTableSimpleWriter } currentSize = 0; keys.clear(); + +// Notify the registered listeners +for (SSTableWriterListener listeners : sSTableWrittenListeners) +{ + listeners.onSSTableWrittenAndClosed(writer.getTableName(), writer.getColumnFamilyName(), writer.getFilename()); +} +} + +public void addSSTableWriterListener(SSTableWriterListener listener) +{ + sSTableWrittenListeners.add(listener); } } diff --git a/src/java/org/apache/cassandra/io/sstable/SSTableWriterListener.java b/src/java/org/apache/cassandra/io/sstable/SSTableWriterListener.java new file mode 100644 index 000..6628d20 --- /dev/null +++ b/src/java/org/apache/cassandra/io/sstable/SSTableWriterListener.java @@ -0,0 +1,9 @@ +package org.apache.cassandra.io.sstable; + +import java.io.IOException; + +public interface SSTableWriterListener { + + void onSSTableWrittenAndClosed(final String tableName, final String columnFamilyName, final String filename) throws IOException; + +}
read-update all columns access pattern
We're on a read and update heavy access pattern. E.g. each request to Cassandra goes like 1. read all columns of row 2. do something with row 3. write all columns of row the columns we use are always the same, e.g. always (c1,c2,c3). c2 and c3 have a TTL. Since we always read c1,c2,c3 and after that overwrite c1,c2,c3, I found out, with https://issues.apache.org/jira/browse/CASSANDRA-2498, specifying which columns I want to read prevents Cassandra from looking into all historic SSTables. However, there is also the possibility to switch to leveled compactions for read/update intense workloads, right? How would you compare both solutions? Should we settle with the access pattern change, switch to leveled compactions, or do both? Thanks! -- Marcel
Re: Behavior on inconsistent reads
What sort of corruption are you thinking about ? Whenever the first CL nodes involved in a read do not agree on the current value a process is run to resolve their differences. This can result in an a node that is out of sync getting repaired. Cheers - Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 11/05/2012, at 11:17 PM, Carpenter, Curt wrote: I (now) understand that the point of this is to get the most recent copy (at least of the nodes checked) if all replicas simply haven’t been updated to the latest changes. But what about dealing with corruption? What if the most recent copy is corrupt? With a Zookeeper-based transaction system on top, corruption is all I’m worried about. From: Dave Brosius [mailto:dbros...@mebigfatguy.com] Sent: Thursday, May 10, 2012 10:03 PM If you read at Consistency of at least quorum, you are guaranteed that at least one of the nodes has the latest data, and so you get the right data. If you read with less than quorum it would be possible for all the nodes that respond to have stale data. On 05/10/2012 09:46 PM, Carpenter, Curt wrote: Hi all, newbie here. Be gentle. From http://www.datastax.com/docs/1.0/cluster_architecture/about_client_requests: “Thus, the coordinator first contacts the replicas specified by the consistency level. The coordinator will send these requests to the replicas that are currently responding most promptly. The nodes contacted will respond with the requested data; if multiple nodes are contacted, the rows from each replica are compared in memory to see if they are consistent. If they are not, then the replica that has the most recent data (based on the timestamp) is used by the coordinator to forward the result back to the client. To ensure that all replicas have the most recent version of frequently-read data, the coordinator also contacts and compares the data from all the remaining replicas that own the row in the background, and if they are inconsistent, issues writes to the out-of-date replicas to update the row to reflect the most recently written values. This process is known as read repair. Read repair can be configured per column family (usingread_repair_chance), and is enabled by default. For example, in a cluster with a replication factor of 3, and a read consistency level of QUORUM, 2 of the 3 replicas for the given row are contacted to fulfill the read request. Supposing the contacted replicas had different versions of the row, the replica with the most recent version would return the requested data. In the background, the third replica is checked for consistency with the first two, and if needed, the most recent replica issues a write to the out-of-date replicas.” Always returns the most recent? What if the most recent write is corrupt? I thought the whole point of a quorum was that consistency is verified before the data is returned to the client. No? Thanks, Curt
Re: Cassandra stucks
We've not had any reported issues with connection handing, I would look for other possible reasons first. Out of interest though what OS are you using? and what is the exact JVM version ? The javax.naming.CommunicationException (http://docs.oracle.com/javase/6/docs/api/javax/naming/CommunicationException.html) is raised when code cannot talk to the DNS server. Where are you running nodetool from ? Do you have any switches or firewalls between the servers ? Could they be closing connections ? Can you match the logs between machines. e.g. what was 172.15.2.163 doing when the node below thought it was dead. What cassandra configuration changes have you made to the nodes and is there anything interesting with your networking setup ? Cheers - Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 12/05/2012, at 4:11 AM, Pavel Polushkin wrote: Hello, Actually there is no problems with JMX, it works fine when node are in UP state. But after a while cluster goes to inadequate state. For now it seems that it’s a bug of connection handling in Cassandra. Pavel. From: Madalina Matei [mailto:madalinaima...@gmail.com] Sent: Friday, May 11, 2012 20:03 To: user@cassandra.apache.org Subject: Re: Cassandra stucks Check your JMX port in cassandra-env.sh and see if that's open. Also if you have enabled JVM_OPTS=$JVM_OPTS -Djava.rmi.server.hostname=public name and you are using an ip address for -Djava.rmi.server.hostname make sure that is the correct ip. On 11 May 2012, at 16:42, Pavel Polushkin wrote: No We are using dedicated phisical hardware. Currently we have 5 nodes. From: Madalina Matei [mailto:madalinaima...@gmail.com] Sent: Friday, May 11, 2012 19:40 To: user@cassandra.apache.org Subject: Re: Cassandra stucks Are you using EC2 ? On 11 May 2012, at 16:13, Pavel Polushkin wrote: We use 1.0.8 version. From: David Leimbach [mailto:leim...@gmail.com] Sent: Friday, May 11, 2012 18:48 To: user@cassandra.apache.org Subject: Re: Cassandra stucks What's the version number of Cassandra? On Fri, May 11, 2012 at 7:38 AM, Pavel Polushkin ppolush...@enkata.com wrote: Hello, We faced with a strange problem while testing performance on Cassandra cluster. After some time all nodes went to down state for several days. Now all nodes went back to up state and only one node still down. Nodetool on down node throws exception: Error connection to remote JMX agent! java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is: java.net.SocketTimeoutException: Read timed out] at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:340) at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:248) at org.apache.cassandra.tools.NodeProbe.connect(NodeProbe.java:144) at org.apache.cassandra.tools.NodeProbe.init(NodeProbe.java:114) at org.apache.cassandra.tools.NodeCmd.main(NodeCmd.java:623) Caused by: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is: java.net.SocketTimeoutException: Read timed out] at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:101) at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:185) at javax.naming.InitialContext.lookup(InitialContext.java:392) at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1888) at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1858) at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:257) ... 4 more Caused by: java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is: java.net.SocketTimeoutException: Read timed out at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:286) at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184) at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322) at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source) at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:97) ... 9 more Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at java.io.BufferedInputStream.read(BufferedInputStream.java:237) at
How to make the search by columns in range case insensitive ?
I need to make a search by names index using entity names as column names in a row. This data is split in several rows using the first 3 character of entity name as row key the remaining part as column name col value contains entity id. But there is a problem, I m storing this data in a CF using byte type comparator. I need to make case insensitive queries to retrieve 'n' no of cols column names starting from a point. Any ideas about how should I do that ?
RE: zabbix templates
This is, for example, Zabbix agent config for Linux based Cassandra, just find cmdline-jmxclient-0.10.3.jar. Not all items are there, add any you need, if missed. Start from JMX to understand, what parameters to use with keys, for example, cassandra.db.Caches[KEYSPACE,CACHE_NAME,COUNTER] ### CASSANDRA USER-DEFINED MONITORED PARAMETERS UserParameter=cassandra.db.Caches[*],java -jar /etc/zabbix/cmdline-jmxclient-0.10.3.jar - 127.0.0.1:7199 org.apache.cassandra.db:type=Caches,keyspace=$1,cache=$2 $3 21 | awk '{print $$6;}' UserParameter=cassandra.db.ColumnFamilies[*],java -jar /etc/zabbix/cmdline-jmxclient-0.10.3.jar - 127.0.0.1:7199 org.apache.cassandra.db:type=ColumnFamilies,keyspace=$1,columnfamily=$2 $3 21 | awk '{print $$6;}' UserParameter=cassandra.db.CompactionManager[*],java -jar /etc/zabbix/cmdline-jmxclient-0.10.3.jar - 127.0.0.1:7199 org.apache.cassandra.db:type=CompactionManager $1 21 | awk '{print $$6;}' UserParameter=cassandra.db.StorageProxy[*],java -jar /etc/zabbix/cmdline-jmxclient-0.10.3.jar - 127.0.0.1:7199 org.apache.cassandra.db:type=StorageProxy $1 21 | awk '{print $$6;}' UserParameter=cassandra.db.StorageService[*],java -jar /etc/zabbix/cmdline-jmxclient-0.10.3.jar - 127.0.0.1:7199 org.apache.cassandra.db:type=StorageService $1 21 | awk '{split($$6,a,E);if(a[2]!=){split(a[1],c,.);b=c[1]c[2];for(i=1;i=a[2]-length(c[2]);i++)b=b0;} else b=a[1];print b;}' UserParameter=cassandra.memory.Heap[*],java -jar /etc/zabbix/cmdline-jmxclient-0.10.3.jar - 127.0.0.1:7199 java.lang:type=Memory HeapMemoryUsage 21 | awk '/$1/ {print $$2;}' UserParameter=cassandra.memory.NonHeap[*],java -jar /etc/zabbix/cmdline-jmxclient-0.10.3.jar - 127.0.0.1:7199 java.lang:type=Memory NonHeapMemoryUsage 21 | awk '/$1/ {print $$2;}' UserParameter=cassandra.request.MutationStage[*],java -jar /etc/zabbix/cmdline-jmxclient-0.10.3.jar - 127.0.0.1:7199 org.apache.cassandra.request:type=MutationStage $1 21 | awk '{print $$6;}' UserParameter=cassandra.request.ReadRepairStage[*],java -jar /etc/zabbix/cmdline-jmxclient-0.10.3.jar - 127.0.0.1:7199 org.apache.cassandra.request:type=ReadRepairStage $1 21 | awk '{print $$6;}' UserParameter=cassandra.request.ReadStage[*],java -jar /etc/zabbix/cmdline-jmxclient-0.10.3.jar - 127.0.0.1:7199 org.apache.cassandra.request:type=ReadStage $1 21 | awk '{print $$6;}' UserParameter=cassandra.request.RequestResponseStage[*],java -jar /etc/zabbix/cmdline-jmxclient-0.10.3.jar - 127.0.0.1:7199 org.apache.cassandra.request:type=MutationStage $1 21 | awk '{print $$6;}' UserParameter=cassandra.runtime[*],java -jar /etc/zabbix/cmdline-jmxclient-0.10.3.jar - 127.0.0.1:7199 java.lang:type=Runtime $1 21 | awk '{print $$6;}' UserParameter=cassandra.threading[*],java -jar /etc/zabbix/cmdline-jmxclient-0.10.3.jar - 127.0.0.1:7199 java.lang:type=Threading $1 21 | awk '{print $$6;}' UserParameter=cassandra.os[*],java -jar /etc/zabbix/cmdline-jmxclient-0.10.3.jar - 127.0.0.1:7199 java.lang:type=OperatingSystem $1 21 | awk '{print $$6;}' UserParameter=cassandra.gc.parnew[*],java -jar /etc/zabbix/cmdline-jmxclient-0.10.3.jar - 127.0.0.1:7199 java.lang:type=GarbageCollector,name=ParNew LastGcInfo 21 | awk '/$1/ {print $$2;}' UserParameter=cassandra.gc.cms[*],java -jar /etc/zabbix/cmdline-jmxclient-0.10.3.jar - 127.0.0.1:7199 java.lang:type=GarbageCollector,name=ConcurrentMarkSweep LastGcInfo 21 | awk '/$1/ {print $$2;}' UserParameter=cassandra.db.DynamicSnitchScores[*],java -jar /etc/zabbix/cmdline-jmxclient-0.10.3.jar - 127.0.0.1:7199 org.apache.cassandra.db:type=DynamicEndpointSnitch,instance=* Scores 21 | awk '{split($$0,a, );for(i in a){if(match(a[i],/$1/)!=0){split(a[i],b,=);sub(/,|}/,,b[2]);print b[2];break;}}}' Best regards / Pagarbiai Viktor Jevdokimov Senior Developer Email: viktor.jevdoki...@adform.com Phone: +370 5 212 3063 Fax: +370 5 261 0453 J. Jasinskio 16C, LT-01112 Vilnius, Lithuania Disclaimer: The information contained in this message and attachments is intended solely for the attention and use of the named addressee and may be confidential. If you are not the intended recipient, you are reminded that the information remains the property of the sender. You must not use, disclose, distribute, copy, print or rely on this e-mail. If you have received this message in error, please contact the sender immediately and irrevocably delete this message and any copies.-Original Message- From: Cord MacLeod [mailto:cordmacl...@gmail.com] Sent: Saturday, May 12, 2012 06:42 To: user@cassandra.apache.org Subject: zabbix templates I've seen some Cacti templates for Cassandra and a JMX bridge called zap cat, but has anyone created Zabbix templates for Cassandra? cassandra.conf Description: cassandra.conf
RE: how to upgrade my cassadra from SizeTieredCompaction to LeveledCompactiom
There is 2T data on each server. Can someone give me some advice? do not do it Best advice! Best regards / Pagarbiai Viktor Jevdokimov Senior Developer Email: viktor.jevdoki...@adform.com Phone: +370 5 212 3063 Fax: +370 5 261 0453 J. Jasinskio 16C, LT-01112 Vilnius, Lithuania Disclaimer: The information contained in this message and attachments is intended solely for the attention and use of the named addressee and may be confidential. If you are not the intended recipient, you are reminded that the information remains the property of the sender. You must not use, disclose, distribute, copy, print or rely on this e-mail. If you have received this message in error, please contact the sender immediately and irrevocably delete this message and any copies.
RE: counter CF and TTL
There's no TTL on counter columns and no ready-to-use solution I know about. https://issues.apache.org/jira/browse/CASSANDRA-2774 Best regards / Pagarbiai Viktor Jevdokimov Senior Developer Email: viktor.jevdoki...@adform.commailto:viktor.jevdoki...@adform.com Phone: +370 5 212 3063, Fax +370 5 261 0453 J. Jasinskio 16C, LT-01112 Vilnius, Lithuania Follow us on Twitter: @adforminsiderhttp://twitter.com/#!/adforminsider What is Adform: watch this short videohttp://vimeo.com/adform/display [Adform News] http://www.adform.com Disclaimer: The information contained in this message and attachments is intended solely for the attention and use of the named addressee and may be confidential. If you are not the intended recipient, you are reminded that the information remains the property of the sender. You must not use, disclose, distribute, copy, print or rely on this e-mail. If you have received this message in error, please contact the sender immediately and irrevocably delete this message and any copies. From: Tamar Fraenkel [mailto:ta...@tok-media.com] Sent: Sunday, May 13, 2012 18:30 To: cassandra-u...@incubator.apache.org Subject: counter CF and TTL Hi! I saw that when Counter CF were first introduced there was no support for TTL. But I see that Hector does have TTL for HCounterColumn So does a counter column have TTL or not? I actually don't have an issue of big rows, but I don't need the data after a two weeks or so, so it seems a shame to clutter the DB with it. Thanks, Tamar Fraenkel Senior Software Engineer, TOK Media [Inline image 1] ta...@tok-media.commailto:ta...@tok-media.com Tel: +972 2 6409736 Mob: +972 54 8356490 Fax: +972 2 5612956 inline: image001.pnginline: signature-logo29.png
Counter CF and TTL
Hi! I saw that when Counter CF were first introduced there was no support for TTL. CLI does not provide TTL for counter columns. Hector does seem to provide an interface for setting TTL for HCounterColumn, but when I list the content of the CF I don't see the TTL as I see for regular CFs. So does a counter column have TTL or not? I actually don't have an issue of big rows, but I don't need the data after a two weeks or so, so it seems a shame to clutter the DB with it. Thanks, *Tamar Fraenkel * Senior Software Engineer, TOK Media [image: Inline image 1] ta...@tok-media.com Tel: +972 2 6409736 Mob: +972 54 8356490 Fax: +972 2 5612956 tokLogo.png
Re: How to make the search by columns in range case insensitive ?
This could be accomplished with a custom 'CaseInsensitiveUTF8Type' comparator to be used as the comparator for that column family. This would require adding a class of your writing to the server. On 05/14/2012 07:26 AM, Ertio Lew wrote: I need to make a search by names index using entity names as column names in a row. This data is split in several rows using the first 3 character of entity name as row key the remaining part as column name col value contains entity id. But there is a problem, I m storing this data in a CF using byte type comparator. I need to make case insensitive queries to retrieve 'n' no of cols column names starting from a point. Any ideas about how should I do that ?
Re: counter CF and TTL
Thanks *Tamar Fraenkel * Senior Software Engineer, TOK Media [image: Inline image 1] ta...@tok-media.com Tel: +972 2 6409736 Mob: +972 54 8356490 Fax: +972 2 5612956 On Mon, May 14, 2012 at 3:20 PM, Viktor Jevdokimov viktor.jevdoki...@adform.com wrote: There’s no TTL on counter columns and no ready-to-use solution I know about. https://issues.apache.org/jira/browse/CASSANDRA-2774 ** ** ** ** ** ** Best regards / Pagarbiai *Viktor Jevdokimov* Senior Developer Email: viktor.jevdoki...@adform.com Phone: +370 5 212 3063, Fax +370 5 261 0453 J. Jasinskio 16C, LT-01112 Vilnius, Lithuania Follow us on Twitter: @adforminsider http://twitter.com/#!/adforminsider What is Adform: watch this short video http://vimeo.com/adform/display [image: Adform News] http://www.adform.com Disclaimer: The information contained in this message and attachments is intended solely for the attention and use of the named addressee and may be confidential. If you are not the intended recipient, you are reminded that the information remains the property of the sender. You must not use, disclose, distribute, copy, print or rely on this e-mail. If you have received this message in error, please contact the sender immediately and irrevocably delete this message and any copies. *From:* Tamar Fraenkel [mailto:ta...@tok-media.com] *Sent:* Sunday, May 13, 2012 18:30 *To:* cassandra-u...@incubator.apache.org *Subject:* counter CF and TTL ** ** Hi! I saw that when Counter CF were first introduced there was no support for TTL. But I see that Hector does have TTL for HCounterColumn So does a counter column have TTL or not? ** ** I actually don't have an issue of big rows, but I don't need the data after a two weeks or so, so it seems a shame to clutter the DB with it.*** * Thanks, *Tamar Fraenkel * Senior Software Engineer, TOK Media [image: Inline image 1] ta...@tok-media.com Tel: +972 2 6409736 Mob: +972 54 8356490 Fax: +972 2 5612956 ** ** ** ** ** ** signature-logo29.pngtokLogo.pngimage001.png
Odd Node Behavior
Hello, I am having some very strange issues with a cassandra setup. I recognize that this is not the ideal cluster setup, but I'd still like to try and understand what is going wrong. The cluster has 3 machines (A,B,C) running Cassandra 1.0.9 with JNA. A B are in datacenter1 while C is in datacenter2. Cassandra knows about the different datacenter because of the rack inferred snitch. However, we are currently using a simple placement strategy on the keyspace. All reads and writes are done with quorum. Hinted handoffs are enabled. Most the the cassandra settings are at their defaults, with the exception of thrift message sizes, which we have upped to 256 mb (while very rare, we can sometimes have a few larger rows so wanted a big buffer). There is a firewall between the two datacenters. We have enabled TCP traffic for the thrift and storage ports (but not JMX, and no UDP) Another odd thing is that there are actually 2 cassandra clusters hosted on these machines (although with the same setup). Each machine has 2 cassandra processes, but everything is running on different ports and different cluster names. On one of the two clusters we were doing some failover testing. We would take nodes down quickly in succession and make sure sure the system remained up. Most of the time, we got a few timeouts on the failover (unexpected, but not the end of the world) and then quickly recovered; however, twice we were able to put the cluster in an unusable state. We found that sometimes node C, while seemingly up (no load, and marked as UP in the ring by other nodes), was unresponsive to B (when A was down) when B was coordinating a quorum write. We see B making a request in the logs (on debug) and 10 seconds later timing out. We see nothing happening in C's log (also debug). The box is just idling. In retrospect, I should have put it in trace (will do this next time). We had it come back after 30 minutes once. Another time, it came back earlier after cycling it. I also noticed a few other crazy log messages on C in that time period. There were two instances of invalid protocol header, which in code seems to only happen when PROTOCOL_MAGIC doesn't match (MessagingService.java), which seems like an impossible state. I'm currently at a loss trying to explain what is going on. Has anyone seen anything like this? I'd appreciate any additional debugging ideas! Thanks for any help. Regards, Eddie
Re: live ratio counting
liveratio calculation logic also needs to be changed because it is based on assumption that workloads do not change. Can you give an example of the sort of workload change you are thinking of ? i have 3 workload types running in batch. Delete only workload, insert only and heavy update (lot of overwrites) raise maximum liveratio from 64 to at least 80. Have you seen examples in your logs where the calculated live ratio was between 64 and 80 ? yes. Record is about 120, but it is rare. 80 should be good enough. Default 10 (if not jusing jamm) is way too low. Are you experiencing memory pressure you think may be attributed to memtables not being flushed frequently enough ? yes
get dinamicsnith info from php
Hello I want to route request from php client to minimaly loaded node, so i need dinamicsnitch info and gosip, how can i get this info fro php. Perhaps need some daemon that can communicate with cassandra gosip and translate this info to php (socket for example)???
RE: get dinamicsnith info from php
I'm not sure, that selecting node upon DS is a good idea. First of all every node has values about every node, including self. Self DS values are always better than others. For example, 3 nodes RF=2: N1 N2 N3 N1 0.5ms 2ms 2ms N2 2ms 0.5ms 2ms N3 2ms 2ms 0.5ms We have monitored many Cassandra counters, including DS values for every node, and graphs shows that latencies is not about load. So the strategy should be based on use case, node count, RF, replica placement strategy, read repair chance, and more, and more... What do you want to achieve? Best regards / Pagarbiai Viktor Jevdokimov Senior Developer Email: viktor.jevdoki...@adform.commailto:viktor.jevdoki...@adform.com Phone: +370 5 212 3063, Fax +370 5 261 0453 J. Jasinskio 16C, LT-01112 Vilnius, Lithuania Follow us on Twitter: @adforminsiderhttp://twitter.com/#!/adforminsider What is Adform: watch this short videohttp://vimeo.com/adform/display [Adform News] http://www.adform.com Disclaimer: The information contained in this message and attachments is intended solely for the attention and use of the named addressee and may be confidential. If you are not the intended recipient, you are reminded that the information remains the property of the sender. You must not use, disclose, distribute, copy, print or rely on this e-mail. If you have received this message in error, please contact the sender immediately and irrevocably delete this message and any copies. From: ruslan usifov [mailto:ruslan.usi...@gmail.com] Sent: Monday, May 14, 2012 16:58 To: user@cassandra.apache.org Subject: get dinamicsnith info from php Hello I want to route request from php client to minimaly loaded node, so i need dinamicsnitch info and gosip, how can i get this info fro php. Perhaps need some daemon that can communicate with cassandra gosip and translate this info to php (socket for example)??? inline: signature-logo29.png
Re: Does or will Cassandra support OpenJDK ?
Open JDK is java 1.7. Once Cassandra supports Java 1.7 it would most likely work on Open JDK, as the 1.7 Open JDK really is the same thing as Oracle JDK 1.7 without some licensed stuff. -Jeremiah On May 11, 2012, at 10:02 PM, ramesh wrote: I've had problem downloading the Sun (Oracle) JDK and found this thread where the Oracle official is insisting or rather forcing Linux users to move to OpenJDK. Here is the thread https://forums.oracle.com/forums/thread.jspa?threadID=2365607 I need this because I run Cassandra. Just curious to know if I would be able to avoid the pain of using Sun JDK in future for production Cassandra ? regards Ramesh
Re: get dinamicsnith info from php
Sorry for my bad english. I want to solve follow problem. For example we down one node for maintenance reason, for a long time (30 min). Now we use TSocketPool for polling connection to cassandra, but this poll implementation is as i think not so good, it have a custom parameter setRetryInterval, with allow off broken node (now we set i to 10sec), but this mean that every 10sec pool will try to connet down node (i repeat we shutdown node for maintance reason), because it doesn't know node dead or node, but cassandra cluster know this, and this connection attempt is senselessly, also when node make compact it can be heavy loaded, and can't serve client reqest very good (at this moment we can got little increase of avg backend responce time) 2012/5/14 Viktor Jevdokimov viktor.jevdoki...@adform.com I’m not sure, that selecting node upon DS is a good idea. First of all every node has values about every node, including self. Self DS values are always better than others. ** ** For example, 3 nodes RF=2: ** ** N1 N2 N3 N1 0.5ms 2ms 2ms N2 2ms 0.5ms 2ms N3 2ms 2ms 0.5ms ** ** We have monitored many Cassandra counters, including DS values for every node, and graphs shows that latencies is not about load. ** ** So the strategy should be based on use case, node count, RF, replica placement strategy, read repair chance, and more, and more… ** ** What do you want to achieve? ** ** ** ** Best regards / Pagarbiai *Viktor Jevdokimov* Senior Developer Email: viktor.jevdoki...@adform.com Phone: +370 5 212 3063, Fax +370 5 261 0453 J. Jasinskio 16C, LT-01112 Vilnius, Lithuania Follow us on Twitter: @adforminsiderhttp://twitter.com/#%21/adforminsider What is Adform: watch this short video http://vimeo.com/adform/display [image: Adform News] http://www.adform.com Disclaimer: The information contained in this message and attachments is intended solely for the attention and use of the named addressee and may be confidential. If you are not the intended recipient, you are reminded that the information remains the property of the sender. You must not use, disclose, distribute, copy, print or rely on this e-mail. If you have received this message in error, please contact the sender immediately and irrevocably delete this message and any copies. *From:* ruslan usifov [mailto:ruslan.usi...@gmail.com] *Sent:* Monday, May 14, 2012 16:58 *To:* user@cassandra.apache.org *Subject:* get dinamicsnith info from php ** ** Hello I want to route request from php client to minimaly loaded node, so i need dinamicsnitch info and gosip, how can i get this info fro php. Perhaps need some daemon that can communicate with cassandra gosip and translate this info to php (socket for example)??? signature-logo29.png
Re: FW: Cassandra Range Queries Help Needed
Hi Ansar, You'll have much better luck sending questions like this to the user mailing list (added). On Mon, May 14, 2012 at 5:42 AM, Ansar Rafique ansa...@hotmail.com wrote: Hi, I am Apache Cassandra user and currently I am working on 3 nodes cluster in a single data center.I am using the random partitioner for data partitioner. Actually what I am trying to achieve is to have the range queries using Random partioner. I am stick and not getting any help to do it. I created my own column family using Column Familes as Indexes. It is written in page 14 of Apache Cassandra Documentation Book (April 17, 2012) by Datastax Although having the ability to do range scans on rows sounds like a desirable feature of ordered partitioners, there are ways to achieve the same functionality using column family indexes. Most applications can be designed with a data model that supports ordered queries as slices over a set of columns rather than range scans over a set of rows. I would like to know that how we can achieve the same functionality (Range Queries in Random Partitioner) using column family trick. Any simple example would be highly appreciated. Please email me back at ansa...@hotmail.com I read that as advice to reexamine your data model so that queries are performed on rows (slices), and not for them (range queries). -- Eric Evans Acunu | http://www.acunu.com | @acunu
Re: C 1.1 CQL 2.0 or 3.0?
This should not be the case- a keyspace is a keyspace, however created. I haven't been able to reproduce this; are you sure that the cassandra-cli and cqlsh are connecting to the same instance? Maybe you should create a Jira ticket. p On Fri, May 11, 2012 at 2:05 PM, cyril auburtin cyril.aubur...@gmail.comwrote: yes it seems so as long as I create (more than just create keyspace mykeyspace) it with cassandra cli, by creating CF, then I can't connect to it with cqlsh -3 I'll need to translate it in cql3 then 2012/5/11 Jason Wellonen jason.wello...@cassidiancommunications.com ** I think you need to create the keyspace under the context of a v3 connection. Maybe someone else can confirm? -- *From:* cyril auburtin [mailto:cyril.aubur...@gmail.com] *Sent:* Friday, May 11, 2012 11:46 AM *To:* user@cassandra.apache.org *Subject:* Re: C 1.1 CQL 2.0 or 3.0? thx just: can't connect to keyspace with cql 3.0 tic@my:~$ cqlsh Connected to My Cluster at 127.0.0.1:4201. [cqlsh 2.2.0 | Cassandra 1.1.0 | CQL spec 2.0.0 | Thrift protocol 19.30.0] Use HELP for help. cqlsh use mykeyspace; cqlsh:mykeyspace exit; tic@my:~$ cqlsh -3 Connected to My Cluster at 127.0.0.1:4201. [cqlsh 2.2.0 | Cassandra 1.1.0 | CQL spec 3.0.0 | Thrift protocol 19.30.0] Use HELP for help. cqlsh use mykeyspace; Bad Request: Keyspace 'mykeyspace' does not exist cqlsh ?? 2012/5/11 Jason Wellonen jason.wello...@cassidiancommunications.com ** Version 2 is the default for your connection. Are you using cqlsh? If so, use the -3 parameter for version 3... -- *From:* cyril auburtin [mailto:cyril.aubur...@gmail.com] *Sent:* Friday, May 11, 2012 10:51 AM *To:* user@cassandra.apache.org *Subject:* C 1.1 CQL 2.0 or 3.0? I have C* 1.1 but it seems to only come with cql 2.0 INFO 19:35:21,579 Cassandra version: 1.1.0 INFO 19:35:21,581 Thrift API version: 19.30.0 INFO 19:35:21,583 CQL supported versions: 2.0.0,3.0.0-beta1 (default: 2.0.0) the problem is I would like to create such CF : CREATE COLUMNFAMILY TaggedPosts ( ... tag text, ... post uuid, ... blog_rowentries_rowkey text, ... PRIMARY KEY (tag, post) ... ) WITH COMPACT STORAGE; and for me, (cql 2.0) it returns this error Bad Request: line 6:0 mismatched input ')' expecting EOF Is it due to the cql version? how to upgrade to 3.0, since I already have the lastest cassandra release?
Re: live ratio counting
Are you experiencing memory pressure you think may be attributed to memtables not being flushed frequently enough ? yes especially delete workload is really good for OOM cassandra for some reason.
DELETE from table with composite keys
I have a table with a 3 part composite key and I want to delete rows based on the first 2 parts of the key. SELECT works using 2 parts of the key, but DELETE fails with the error: Bad Request: Missing mandatory PRIMARY KEY part part3 (see details below). Is there a reason why deleting based on the first 2 parts should not work? I.e., is it just currently not supported, or is it a permanent limitation? Note that deleting based on just the first part of the key will work… deletes all matching rows. cqlsh:Keyspace1 CREATE TABLE MyTable (part1 text, part2 text, part3 text, data text, PRIMARY KEY(part1, part2, part3)); cqlsh:Keyspace1 INSERT INTO MyTable (part1, part2, part3, data) VALUES (‘a’, ‘b’, ‘c’, ‘d’); cqlsh:Keyspace1 SELECT * FROM MyTable WHERE part1 = ‘a’ AND part2 = ‘b’; part1 | part2 | part3 | data ——-+——-+——-+—— a | b | c | d cqlsh:Keyspace1 DELETE FROM MyTable WHERE part1 = ‘a’ AND part2 = ‘b’; Bad Request: Missing mandatory PRIMARY KEY part part3 cqlsh:Keyspace1 DELETE data FROM MyTable WHERE part1 = ‘a’ AND part2 = ‘b’; Bad Request: Missing mandatory PRIMARY KEY part part3 cqlsh:Keyspace1 DELETE FROM MyTable WHERE part1 = ‘a’; cqlsh:Keyspace1 SELECT * FROM MyTable WHERE part1 = ‘a’ AND part2 = ‘b’; cqlsh:Keyspace1 -Roland
Re: zabbix templates
Outstanding. Extremely helpful, thank you. On May 14, 2012, at 5:05 AM, Viktor Jevdokimov wrote: This is, for example, Zabbix agent config for Linux based Cassandra, just find cmdline-jmxclient-0.10.3.jar. Not all items are there, add any you need, if missed. Start from JMX to understand, what parameters to use with keys, for example, cassandra.db.Caches[KEYSPACE,CACHE_NAME,COUNTER] ### CASSANDRA USER-DEFINED MONITORED PARAMETERS UserParameter=cassandra.db.Caches[*],java -jar /etc/zabbix/cmdline-jmxclient-0.10.3.jar - 127.0.0.1:7199 org.apache.cassandra.db:type=Caches,keyspace=$1,cache=$2 $3 21 | awk '{print $$6;}' UserParameter=cassandra.db.ColumnFamilies[*],java -jar /etc/zabbix/cmdline-jmxclient-0.10.3.jar - 127.0.0.1:7199 org.apache.cassandra.db:type=ColumnFamilies,keyspace=$1,columnfamily=$2 $3 21 | awk '{print $$6;}' UserParameter=cassandra.db.CompactionManager[*],java -jar /etc/zabbix/cmdline-jmxclient-0.10.3.jar - 127.0.0.1:7199 org.apache.cassandra.db:type=CompactionManager $1 21 | awk '{print $$6;}' UserParameter=cassandra.db.StorageProxy[*],java -jar /etc/zabbix/cmdline-jmxclient-0.10.3.jar - 127.0.0.1:7199 org.apache.cassandra.db:type=StorageProxy $1 21 | awk '{print $$6;}' UserParameter=cassandra.db.StorageService[*],java -jar /etc/zabbix/cmdline-jmxclient-0.10.3.jar - 127.0.0.1:7199 org.apache.cassandra.db:type=StorageService $1 21 | awk '{split($$6,a,E);if(a[2]!=){split(a[1],c,.);b=c[1]c[2];for(i=1;i=a[2]-length(c[2]);i++)b=b0;} else b=a[1];print b;}' UserParameter=cassandra.memory.Heap[*],java -jar /etc/zabbix/cmdline-jmxclient-0.10.3.jar - 127.0.0.1:7199 java.lang:type=Memory HeapMemoryUsage 21 | awk '/$1/ {print $$2;}' UserParameter=cassandra.memory.NonHeap[*],java -jar /etc/zabbix/cmdline-jmxclient-0.10.3.jar - 127.0.0.1:7199 java.lang:type=Memory NonHeapMemoryUsage 21 | awk '/$1/ {print $$2;}' UserParameter=cassandra.request.MutationStage[*],java -jar /etc/zabbix/cmdline-jmxclient-0.10.3.jar - 127.0.0.1:7199 org.apache.cassandra.request:type=MutationStage $1 21 | awk '{print $$6;}' UserParameter=cassandra.request.ReadRepairStage[*],java -jar /etc/zabbix/cmdline-jmxclient-0.10.3.jar - 127.0.0.1:7199 org.apache.cassandra.request:type=ReadRepairStage $1 21 | awk '{print $$6;}' UserParameter=cassandra.request.ReadStage[*],java -jar /etc/zabbix/cmdline-jmxclient-0.10.3.jar - 127.0.0.1:7199 org.apache.cassandra.request:type=ReadStage $1 21 | awk '{print $$6;}' UserParameter=cassandra.request.RequestResponseStage[*],java -jar /etc/zabbix/cmdline-jmxclient-0.10.3.jar - 127.0.0.1:7199 org.apache.cassandra.request:type=MutationStage $1 21 | awk '{print $$6;}' UserParameter=cassandra.runtime[*],java -jar /etc/zabbix/cmdline-jmxclient-0.10.3.jar - 127.0.0.1:7199 java.lang:type=Runtime $1 21 | awk '{print $$6;}' UserParameter=cassandra.threading[*],java -jar /etc/zabbix/cmdline-jmxclient-0.10.3.jar - 127.0.0.1:7199 java.lang:type=Threading $1 21 | awk '{print $$6;}' UserParameter=cassandra.os[*],java -jar /etc/zabbix/cmdline-jmxclient-0.10.3.jar - 127.0.0.1:7199 java.lang:type=OperatingSystem $1 21 | awk '{print $$6;}' UserParameter=cassandra.gc.parnew[*],java -jar /etc/zabbix/cmdline-jmxclient-0.10.3.jar - 127.0.0.1:7199 java.lang:type=GarbageCollector,name=ParNew LastGcInfo 21 | awk '/$1/ {print $$2;}' UserParameter=cassandra.gc.cms[*],java -jar /etc/zabbix/cmdline-jmxclient-0.10.3.jar - 127.0.0.1:7199 java.lang:type=GarbageCollector,name=ConcurrentMarkSweep LastGcInfo 21 | awk '/$1/ {print $$2;}' UserParameter=cassandra.db.DynamicSnitchScores[*],java -jar /etc/zabbix/cmdline-jmxclient-0.10.3.jar - 127.0.0.1:7199 org.apache.cassandra.db:type=DynamicEndpointSnitch,instance=* Scores 21 | awk '{split($$0,a, );for(i in a){if(match(a[i],/$1/)!=0){split(a[i],b,=);sub(/,|}/,,b[2]);print b[2];break;}}}' Best regards / Pagarbiai Viktor Jevdokimov Senior Developer Email: viktor.jevdoki...@adform.com Phone: +370 5 212 3063 Fax: +370 5 261 0453 J. Jasinskio 16C, LT-01112 Vilnius, Lithuania Disclaimer: The information contained in this message and attachments is intended solely for the attention and use of the named addressee and may be confidential. If you are not the intended recipient, you are reminded that the information remains the property of the sender. You must not use, disclose, distribute, copy, print or rely on this e-mail. If you have received this message in error, please contact the sender immediately and irrevocably delete this message and any copies.-Original Message- From: Cord MacLeod [mailto:cordmacl...@gmail.com] Sent: Saturday, May 12, 2012 06:42 To: user@cassandra.apache.org Subject: zabbix templates I've seen some Cacti templates for Cassandra and a JMX bridge called zap cat, but has anyone created Zabbix templates for Cassandra? cassandra.conf
Configuring cassandra cluster with host preferences
I am running my processes on the same nodes as Cassandra. What I'd like to do is when I get a connection from Pelops, it gives preference to the Cassandra node local to the host my process is on. Is it possible ? How ? Regards, Oleg Dulin Please note my new office #: 732-917-0159
Re: DELETE from table with composite keys
Slice deletes are not supported currently. It is being worked on. https://issues.apache.org/jira/browse/CASSANDRA-3708 -Jeremiah On May 14, 2012, at 12:18 PM, Roland Mechler wrote: I have a table with a 3 part composite key and I want to delete rows based on the first 2 parts of the key. SELECT works using 2 parts of the key, but DELETE fails with the error: Bad Request: Missing mandatory PRIMARY KEY part part3 (see details below). Is there a reason why deleting based on the first 2 parts should not work? I.e., is it just currently not supported, or is it a permanent limitation? Note that deleting based on just the first part of the key will work… deletes all matching rows. cqlsh:Keyspace1 CREATE TABLE MyTable (part1 text, part2 text, part3 text, data text, PRIMARY KEY(part1, part2, part3)); cqlsh:Keyspace1 INSERT INTO MyTable (part1, part2, part3, data) VALUES (‘a’, ‘b’, ‘c’, ‘d’); cqlsh:Keyspace1 SELECT * FROM MyTable WHERE part1 = ‘a’ AND part2 = ‘b’; part1 | part2 | part3 | data ——-+——-+——-+—— a | b | c | d cqlsh:Keyspace1 DELETE FROM MyTable WHERE part1 = ‘a’ AND part2 = ‘b’; Bad Request: Missing mandatory PRIMARY KEY part part3 cqlsh:Keyspace1 DELETE data FROM MyTable WHERE part1 = ‘a’ AND part2 = ‘b’; Bad Request: Missing mandatory PRIMARY KEY part part3 cqlsh:Keyspace1 DELETE FROM MyTable WHERE part1 = ‘a’; cqlsh:Keyspace1 SELECT * FROM MyTable WHERE part1 = ‘a’ AND part2 = ‘b’; cqlsh:Keyspace1 -Roland
How do I add a custom comparator class to a cassandra cluster ?
I need to add a custom comparator to a cluster, to sort columns in a certain customized fashion. How do I add the class to the cluster ?
Re: How do I add a custom comparator class to a cassandra cluster ?
Disclaimer: I've never tried, but I'd imagine you can drop a JAR containing the class(es) into the lib directory and perform a rolling restart of the nodes. On 5/14/12 11:11 AM, Ertio Lew wrote: I need to add a custom comparator to a cluster, to sort columns in a certain customized fashion. How do I add the class to the cluster ?
Re: How do I add a custom comparator class to a cassandra cluster ?
That's right. Create class that implements the required interface and then drop that jar in lib directory and start the cluster. On Mon, May 14, 2012 at 11:41 AM, Kirk True k...@mustardgrain.com wrote: Disclaimer: I've never tried, but I'd imagine you can drop a JAR containing the class(es) into the lib directory and perform a rolling restart of the nodes. On 5/14/12 11:11 AM, Ertio Lew wrote: I need to add a custom comparator to a cluster, to sort columns in a certain customized fashion. How do I add the class to the cluster ?
Re: How do I add a custom comparator class to a cassandra cluster ?
Kirk is correct. -- Tom Duffield (Mailing Lists) Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On Monday, May 14, 2012 at 1:41 PM, Kirk True wrote: Disclaimer: I've never tried, but I'd imagine you can drop a JAR containing the class(es) into the lib directory and perform a rolling restart of the nodes. On 5/14/12 11:11 AM, Ertio Lew wrote: I need to add a custom comparator to a cluster, to sort columns in a certain customized fashion. How do I add the class to the cluster ?
RE: get dinamicsnith info from php
Let say you have 8 nodes cluster with replication factor 3. If one node is down, for its token range you have only 2 nodes left, not 7, which can process you requests - other nodes will forward requests to the nearest (depends on snitch) or with lower latency (depends on dynamic snitch) of 2 remaining. I have no idea about PHP and its multithreading capabilities, if it's impossible to run background thread to return dead endpoint to the list, instead of checking it on HTTP request thread, you're stacked. For the lower latencies dynamic snitch already do a job for you, selecting a node with lower latencies. If you'd like Cassandra to avoid forwarding requests to appropriate node, but making a direct request to a node where data is, you need smarter client, capable to select node by key and other things to do to achieve this. Best regards / Pagarbiai Viktor Jevdokimov Senior Developer Email: viktor.jevdoki...@adform.commailto:viktor.jevdoki...@adform.com Phone: +370 5 212 3063, Fax +370 5 261 0453 J. Jasinskio 16C, LT-01112 Vilnius, Lithuania Follow us on Twitter: @adforminsiderhttp://twitter.com/#!/adforminsider What is Adform: watch this short videohttp://vimeo.com/adform/display [Adform News] http://www.adform.com Disclaimer: The information contained in this message and attachments is intended solely for the attention and use of the named addressee and may be confidential. If you are not the intended recipient, you are reminded that the information remains the property of the sender. You must not use, disclose, distribute, copy, print or rely on this e-mail. If you have received this message in error, please contact the sender immediately and irrevocably delete this message and any copies. From: ruslan usifov [mailto:ruslan.usi...@gmail.com] Sent: Monday, May 14, 2012 17:41 To: user@cassandra.apache.org Subject: Re: get dinamicsnith info from php Sorry for my bad english. I want to solve follow problem. For example we down one node for maintenance reason, for a long time (30 min). Now we use TSocketPool for polling connection to cassandra, but this poll implementation is as i think not so good, it have a custom parameter setRetryInterval, with allow off broken node (now we set i to 10sec), but this mean that every 10sec pool will try to connet down node (i repeat we shutdown node for maintance reason), because it doesn't know node dead or node, but cassandra cluster know this, and this connection attempt is senselessly, also when node make compact it can be heavy loaded, and can't serve client reqest very good (at this moment we can got little increase of avg backend responce time) 2012/5/14 Viktor Jevdokimov viktor.jevdoki...@adform.commailto:viktor.jevdoki...@adform.com I'm not sure, that selecting node upon DS is a good idea. First of all every node has values about every node, including self. Self DS values are always better than others. For example, 3 nodes RF=2: N1 N2 N3 N1 0.5ms 2ms 2ms N2 2ms 0.5ms 2ms N3 2ms 2ms 0.5ms We have monitored many Cassandra counters, including DS values for every node, and graphs shows that latencies is not about load. So the strategy should be based on use case, node count, RF, replica placement strategy, read repair chance, and more, and more... What do you want to achieve? Best regards / Pagarbiai Viktor Jevdokimov Senior Developer Email: viktor.jevdoki...@adform.commailto:viktor.jevdoki...@adform.com Phone: +370 5 212 3063, Fax +370 5 261 0453 J. Jasinskio 16C, LT-01112 Vilnius, Lithuania Follow us on Twitter: @adforminsiderhttp://twitter.com/#%21/adforminsider What is Adform: watch this short videohttp://vimeo.com/adform/display [Adform News]http://www.adform.com Disclaimer: The information contained in this message and attachments is intended solely for the attention and use of the named addressee and may be confidential. If you are not the intended recipient, you are reminded that the information remains the property of the sender. You must not use, disclose, distribute, copy, print or rely on this e-mail. If you have received this message in error, please contact the sender immediately and irrevocably delete this message and any copies. From: ruslan usifov [mailto:ruslan.usi...@gmail.commailto:ruslan.usi...@gmail.com] Sent: Monday, May 14, 2012 16:58 To: user@cassandra.apache.orgmailto:user@cassandra.apache.org Subject: get dinamicsnith info from php Hello I want to route request from php client to minimaly loaded node, so i need dinamicsnitch info and gosip, how can i get this info fro php. Perhaps need some daemon that can communicate with cassandra gosip and translate this info to php (socket for example)??? inline: image001.pnginline: signature-logo29.png
Re: primary keys query
So it seems it's not a good idea, to use Cassandra like that? Right. It's basically a table scan. Here is some background on the approach simple geo took to using Cassandra... http://www.readwriteweb.com/cloud/2011/02/video-simplegeo-cassandra.php Also PostGis for Postgress seems popular http://postgis.refractions.net/ Hope that helps. - Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 12/05/2012, at 4:23 AM, cyril auburtin wrote: I was thinking of a CF with many many rows with id, type, latitude and longitude (indexed), and do geolocation queries: type=all and lat 43 and lat 42.9 and lon 7.3 and lon 7.2 where all rows have type=all (at least try how Cassandra deals with that) So it seems it's not a good idea, to use Cassandra like that? There's also the possibly to do in parallel, other CF, with latitude in rows, that will be sorted, so an indexed query can give us the right latidue range, and then just query with logitude and What do you think of that thanks 2012/5/11 Dave Brosius dbros...@mebigfatguy.com Inequalities on secondary indices are always done in memory, so without at least one EQ on another secondary index you will be loading every row in the database, which with a massive database isn't a good idea. So by requiring at least one EQ on an index, you hopefully limit the set of rows that need to be read into memory to a manageable size. Although obviously you can still get into trouble with that as well. On 05/11/2012 09:39 AM, cyril auburtin wrote: Sorry for askign that but Why is it necessary to always have at least one EQ comparison [default@Keyspace1] get test where birth_year1985; No indexed columns present in index clause with operator EQ It oblige to have one dummy indexed column, to do this query [default@Keyspace1] get test where tag=sea and birth_year1985; --- RowKey: sam = (column=birth_year, value=1988, timestamp=1336742346059000)
Re: [ANN] Gossie, a Cassandra library for Go
Looks nice! On Mon, May 14, 2012 at 3:22 AM, Carlos carlo...@gmail.com wrote: Hello, I would like to introduce you to my Go Cassandra client/library, Gossie: https://github.com/carloscm/gossie My intention was to use my favorite database with my favorite language, with a library that allowed me to take advantage of idiomatic Go code with the main strengths of Cassandra. I focused on offering a smooth as possible integration with Go, including auto marshaling of most primitive built-in types and structs. I also wanted to focus on what I think is the main strength of the Cassandra data model, its column-oriented storage with ordering, which I think it is unfortunately overlooked by many people just wanting a typical key/value store. Features include: - Connection pooling to N hosts, with transparent failover and retry of queries - A low level wrapper for the Thrift interface, much easier to use than the bare Thrift bindings - Extensive type marshaling, both automatic and custom, so you can force a native integer to be serialised as a string for example - Struct mapping into Cassandra rows (or row slices), with support for both sparse and compact storage and field name/type overriding - A high level query interface that deals with structs and mappings instead of rows and column families Here is an example, using a sparse storage column family with a slice (the equivalent in the current README.md is a bit outdated): /* In CQL 3.0: CREATE TABLE Timeline ( UserID varchar, TweetID bigint, Author varchar, Body varchar, PRIMARY KEY (UserID, TweetID) ); */ // In Gossie: type Tweet struct { UserID string `cf:Timeline key:UserID cols:TweetID` TweetID int64 Author string Bodystring } pool := gossie.NewConnectionPool([]string{localhost:9160}, Example, PoolOptions{Size: 50, Timeout: 3000}) query := pool.Query(NewMapping(Tweet{})) // all tweets for a given user between TweetID 1000 and 2000 result, err := query.Between(1000, 2000).Get(username) // iterating over results for { t := Tweet{} err := result.Next(t) if err != nil { break } } Key and comparator component marshaling and positions are implicit and automatic, based on the struct mapping, making it very easy to use complex comparators. Also the sparse row support is flexible, in the sense it doesn't depend on a fixed number fields. It is able to detect a new object in the row by discontinuities in the composite values. Feedback is welcome! Thank you!
Re: cassandra 1.0.9 error - Read an invalid frame size of 0
Are you using framed transport on the client side ? Try the Hector user list for hector specific help https://groups.google.com/forum/?fromgroups#!searchin/hector-users Cheers - Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 12/05/2012, at 5:44 AM, Gurpreet Singh wrote: This is hampering our testing of cassandra a lot, and our move to cassandra 1.0.9. Has anyone seen this before? Should I be trying a different version of cassandra? /G On Thu, May 10, 2012 at 11:29 PM, Gurpreet Singh gurpreet.si...@gmail.com wrote: Hi, i have created 1 node cluster of cassandra 1.0.9. I am setting this up for testing reads/writes. I am seeing the following error in the server system.log ERROR [Selector-Thread-7] 2012-05-10 22:44:02,607 TNonblockingServer.java (line 467) Read an invalid frame size of 0. Are you using TFramedTransport on the client side? Initially i was using a old hector 0.7.x, but even after switching to hector 1.0-5 and thrift version 0.6.1, i still see this error. I am using 20 threads writing/reading from cassandra. The max write batch size is 10 with payload size constant per key to be 600 bytes. On the client side, i see Hector exceptions happenning coinciding with these messages on the server. Any ideas why these errors are happenning? Thanks Gurpreet
cassandra initial script does not take default cluster_name
when I tried to start my first Cassandra service instance, i got following error message, JavaBean=org.apache.cassandra.config.Config@7c2e1f1f; No single argument constructor found for class [Ljava.lang.String; in reader, line 10, column 1: cluster_name: 'testCluster' I have Java 1.6 and set commitlog, data and saved_caches in cassandra.yxml full log: INFO [main] 2012-05-14 13:05:43,655 AbstractCassandraDaemon.java (line 100) Logging initialized INFO [main] 2012-05-14 13:05:43,659 AbstractCassandraDaemon.java (line 121) JVM vendor/version: Java HotSpot(TM) 64-Bit Server VM/1.6.0_26 INFO [main] 2012-05-14 13:05:43,659 AbstractCassandraDaemon.java (line 122) Heap size: 1060372480/1060372480 INFO [main] 2012-05-14 13:05:43,659 AbstractCassandraDaemon.java (line 123) Classpath: C:\apache-cassandra-1.1.0\conf;C:\apache-cassandra-1.1.0\lib\antlr- 3.2.jar;C:\apache-cassandra-1.1.0\lib\apache-cassandra-1.1.0.jar;C:\apache- cassandra-1.1.0\lib\apache-cassandra-clientutil-1.1.0.jar;C:\apache-cassandra- 1.1.0\lib\apache-cassandra-thrift-1.1.0.jar;C:\apache-cassandra-1.1.0\lib\avro- 1.4.0-fixes.jar;C:\apache-cassandra-1.1.0\lib\avro-1.4.0-sources- fixes.jar;C:\apache-cassandra-1.1.0\lib\commons-cli-1.1.jar;C:\apache- cassandra- 1.1.0\lib\commons-codec-1.2.jar;C:\apache-cassandra-1.1.0\lib\commons-lang- 2.4.jar;C:\apache-cassandra-1.1.0\lib\compress-lzf-0.8.4.jar;C:\apache- cassandra-1.1.0\lib\concurrentlinkedhashmap-lru-1.2.jar;C:\apache-cassandra- 1.1.0\lib\guava-r08.jar;C:\apache-cassandra-1.1.0\lib\high-scale-lib- 1.1.2.jar;C:\apache-cassandra-1.1.0\lib\jackson-core-asl-1.9.2.jar;C:\apache- cassandra-1.1.0\lib\jackson-mapper-asl-1.9.2.jar;C:\apache-cassandra- 1.1.0\lib\jamm-0.2.5.jar;C:\apache-cassandra-1.1.0\lib\jline- 0.9.94.jar;C:\apache-cassandra-1.1.0\lib\json-simple-1.1.jar;C:\apache- cassandra-1.1.0\lib\libthrift-0.7.0.jar;C:\apache-cassandra-1.1.0\lib\log4j- 1.2.16.jar;C:\apache-cassandra-1.1.0\lib\metrics-core-2.0.3.jar;C:\apache- cassandra-1.1.0\lib\servlet-api-2.5-20081211.jar;C:\apache-cassandra- 1.1.0\lib\slf4j-api-1.6.1.jar;C:\apache-cassandra-1.1.0\lib\slf4j-log4j12- 1.6.1.jar;C:\apache-cassandra-1.1.0\lib\snakeyaml-1.6.jar;C:\apache-cassandra- 1.1.0\lib\snappy-java-1.0.4.1.jar;C:\apache-cassandra-1.1.0\lib\snaptree- 0.1.jar;C:\apache-cassandra-1.1.0\build\classes\main;C:\apache-cassandra- 1.1.0\build\classes\thrift;C:\apache-cassandra-1.1.0\lib\jamm-0.2.5.jar INFO [main] 2012-05-14 13:05:43,662 CLibrary.java (line 66) JNA not found. Native methods will be disabled. INFO [main] 2012-05-14 13:05:43,670 DatabaseDescriptor.java (line 127) Loading settings from file:/C:/apache-cassandra-1.1.0/conf/cassandra.yaml ERROR [main] 2012-05-14 13:05:43,762 DatabaseDescriptor.java (line 479) Fatal configuration error error Can't construct a java object for tag:yaml.org,2002:org.apache.cassandra.config.Config; exception=Cannot create property=data_file_directories for JavaBean=org.apache.cassandra.config.Config@7c2e1f1f; No single argument constructor found for class [Ljava.lang.String; in reader, line 10, column 1: cluster_name: 'testCluster' ^ at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct (Constru ctor.java:372) at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject (BaseConstructor.j ava:177) at org.yaml.snakeyaml.constructor.BaseConstructor.constructDocument (BaseConstructor .java:136) at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData (BaseConstructor.jav a:122) at org.yaml.snakeyaml.Loader.load(Loader.java:52) at org.yaml.snakeyaml.Yaml.load(Yaml.java:166) at org.apache.cassandra.config.DatabaseDescriptor.loadYaml (DatabaseDescriptor.java: 143) at org.apache.cassandra.config.DatabaseDescriptor.clinit (DatabaseDescriptor.java:118) at org.apache.cassandra.service.AbstractCassandraDaemon.setup (AbstractCassandraDaem on.java:126) at org.apache.cassandra.service.AbstractCassandraDaemon.activate (AbstractCassandraD aemon.java:353) at org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:106) Caused by: org.yaml.snakeyaml.error.YAMLException: Cannot create property=data_file_directories for JavaBean=org.apache.cassandra.config.Config@7c2e1f1f; No single argument constructor found for class [Ljava.lang.String; at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2n d Step(Constructor.java:305) at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.construct (Constructo r.java:184) at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct (Constru ctor.java:370) ... 10 more Caused by: org.yaml.snakeyaml.error.YAMLException: No single argument constructor found for class [Ljava.lang.String; at org.yaml.snakeyaml.constructor.Constructor$ConstructScalar.construct (Constructor .java:419) at
Re: Cassandra Explorer - GUI for viewing Cassandra Data
Neat. Would you like to add it to the list here ? http://wiki.apache.org/cassandra/Administration%20Tools Cheers - Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 13/05/2012, at 4:45 AM, shelan Perera wrote: Hi, Cassandra CLI is the primary tool we use to view Cassandra Data. An Explorer has been developed to view data in a Cassandra Cluster. I thought that this would find convenient for the users to view data. This in the early stages and any feedback is highly appreciated. You can find a blog post on how to use it at [1] . [1] http://blog.shelan.org/2012/05/cassandra-explorer-gui-for-cassandra.html -- Shelan Perera Home: http://www.shelan.org Blog : http://www.shelanlk.com Twitter: shelan skype :shelan.perera gtalk :shelanrc I am the master of my fate: I am the captain of my soul. *invictus*
Re: nodetool repair requirement
Personally I would. Repair is *the* was to ensure data is fully distributed. Hinted Hand Off and Read Repair are considered optimisations designed to reduce the chance of an inconsistency during a read. Cheers - Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 14/05/2012, at 4:57 AM, Igor wrote: On 05/13/2012 07:18 PM, Thanh Ha wrote: Hi All, Do I have to do maintenance nodetool repair on CFs that do not have deletions? Probably you should (depending how you do reads), if your nodes for some reasons have different data (like connectivity problems, node down, etc). I only perform deletes on two column families in my cluster. Thanks
Re: get dinamicsnith info from php
I struggled with this before and decided to use HAProxy which suits my needs, you can read a little more about it at my personal blog: http://www.robinverlangen.nl/index/view/4fa902c1596cb-44a627/how-to-solve-the-pain-of-stateless-php-with-cassandra.html Good luck with it! 2012/5/14 Viktor Jevdokimov viktor.jevdoki...@adform.com Let say you have 8 nodes cluster with replication factor 3. If one node is down, for its token range you have only 2 nodes left, not 7, which can process you requests – other nodes will forward requests to the nearest (depends on snitch) or with lower latency (depends on dynamic snitch) of 2 remaining. ** ** I have no idea about PHP and its multithreading capabilities, if it’s impossible to run background thread to return dead endpoint to the list, instead of checking it on HTTP request thread, you’re stacked. For the lower latencies dynamic snitch already do a job for you, selecting a node with lower latencies. ** ** If you’d like Cassandra to avoid forwarding requests to appropriate node, but making a direct request to a node where data is, you need smarter client, capable to select node by key and other things to do to achieve this. ** ** ** ** Best regards / Pagarbiai *Viktor Jevdokimov* Senior Developer Email: viktor.jevdoki...@adform.com Phone: +370 5 212 3063, Fax +370 5 261 0453 J. Jasinskio 16C, LT-01112 Vilnius, Lithuania Follow us on Twitter: @adforminsider http://twitter.com/#!/adforminsider What is Adform: watch this short video http://vimeo.com/adform/display [image: Adform News] http://www.adform.com Disclaimer: The information contained in this message and attachments is intended solely for the attention and use of the named addressee and may be confidential. If you are not the intended recipient, you are reminded that the information remains the property of the sender. You must not use, disclose, distribute, copy, print or rely on this e-mail. If you have received this message in error, please contact the sender immediately and irrevocably delete this message and any copies. *From:* ruslan usifov [mailto:ruslan.usi...@gmail.com] *Sent:* Monday, May 14, 2012 17:41 *To:* user@cassandra.apache.org *Subject:* Re: get dinamicsnith info from php ** ** Sorry for my bad english. I want to solve follow problem. For example we down one node for maintenance reason, for a long time (30 min). Now we use TSocketPool for polling connection to cassandra, but this poll implementation is as i think not so good, it have a custom parameter setRetryInterval, with allow off broken node (now we set i to 10sec), but this mean that every 10sec pool will try to connet down node (i repeat we shutdown node for maintance reason), because it doesn't know node dead or node, but cassandra cluster know this, and this connection attempt is senselessly, also when node make compact it can be heavy loaded, and can't serve client reqest very good (at this moment we can got little increase of avg backend responce time) 2012/5/14 Viktor Jevdokimov viktor.jevdoki...@adform.com I’m not sure, that selecting node upon DS is a good idea. First of all every node has values about every node, including self. Self DS values are always better than others. For example, 3 nodes RF=2: N1 N2 N3 N1 0.5ms 2ms 2ms N2 2ms 0.5ms 2ms N3 2ms 2ms 0.5ms We have monitored many Cassandra counters, including DS values for every node, and graphs shows that latencies is not about load. So the strategy should be based on use case, node count, RF, replica placement strategy, read repair chance, and more, and more… What do you want to achieve? ** ** Best regards / Pagarbiai *Viktor Jevdokimov* Senior Developer ** ** Email: viktor.jevdoki...@adform.com Phone: +370 5 212 3063, Fax +370 5 261 0453 J. Jasinskio 16C, LT-01112 Vilnius, Lithuania Follow us on Twitter: @adforminsiderhttp://twitter.com/#%21/adforminsider What is Adform: watch this short video http://vimeo.com/adform/display** ** [image: Adform News] http://www.adform.com Disclaimer: The information contained in this message and attachments is intended solely for the attention and use of the named addressee and may be confidential. If you are not the intended recipient, you are reminded that the information remains the property of the sender. You must not use, disclose, distribute, copy, print or rely on this e-mail. If you have received this message in error, please contact the sender immediately and irrevocably delete this message and any copies. ** ** *From:* ruslan usifov [mailto:ruslan.usi...@gmail.com] *Sent:* Monday, May 14, 2012 16:58 *To:* user@cassandra.apache.org *Subject:* get dinamicsnith info from php
Re: Retrieving old data version for a given row
Cassandra does not provide access to multiple versions of the same column. It is essentially implementation detail. All mutations are written to the commit log in a binary format, see the o.a.c.db.RowMutation.getSerializedBuffer() (If you want to tail it for analysis you may want to change commitlog_sync in cassandra.yaml) Here is post about looking at multiple versions columns in an sstable http://thelastpickle.com/2011/05/15/Deletes-and-Tombstones/ Remember that not all versions of a column are written to disk (see http://thelastpickle.com/2011/04/28/Forces-of-Write-and-Read/). Also compaction will compress multiple versions of the same column from multiple files into a single version in a single file . Hope that helps. - Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 14/05/2012, at 9:50 PM, Felipe Schmidt wrote: Yes, I need this information just for academic purposes. So, to read old data values, I tried to open the Commitlog using tail -f and also the log files viewer of Ubuntu, but I can not see many informations inside of the log! Is there any other way to open this log? I didn't find any Cassandra API for this purpose. Thanks averybody in advance. Regards, Felipe Mathias Schmidt (Computer Science UFRGS, RS, Brazil) 2012/5/14 zhangcheng2 zhangche...@software.ict.ac.cn: After compaciton, the old version data will gone! zhangcheng2 From: Felipe Schmidt Date: 2012-05-14 05:33 To: user Subject: Retrieving old data version for a given row I'm trying to retrieve old data version for some row but it seems not be possible. I'm a beginner with Cassandra and the unique aproach I know is looking to the SSTable in the storage folder, but if I insert some column and right after insert another value to the same row, after flushing, I only get the last value. Is there any way to get the old data version? Obviously, before compaction. Regards, Felipe Mathias Schmidt (Computer Science UFRGS, RS, Brazil)
Re: Counter CF and TTL
Counter columns do not support a TTL. Cheers - Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 15/05/2012, at 12:20 AM, Tamar Fraenkel wrote: Hi! I saw that when Counter CF were first introduced there was no support for TTL. CLI does not provide TTL for counter columns. Hector does seem to provide an interface for setting TTL for HCounterColumn, but when I list the content of the CF I don't see the TTL as I see for regular CFs. So does a counter column have TTL or not? I actually don't have an issue of big rows, but I don't need the data after a two weeks or so, so it seems a shame to clutter the DB with it. Thanks, Tamar Fraenkel Senior Software Engineer, TOK Media tokLogo.png ta...@tok-media.com Tel: +972 2 6409736 Mob: +972 54 8356490 Fax: +972 2 5612956
Re: Configuring cassandra cluster with host preferences
It's not possible 'out of the box' but you could implement your own org.scale7.cassandra.pelops.pool.CommonsBackedPool.INodeSelectionStrategy that chooses the desired node. -- Dan Washusen Make big files fly visit digitalpigeon.com (http://digitalpigeon.com) On Tuesday, 15 May 2012 at 3:23 AM, Oleg Dulin wrote: I am running my processes on the same nodes as Cassandra. What I'd like to do is when I get a connection from Pelops, it gives preference to the Cassandra node local to the host my process is on. Is it possible ? How ? Regards, Oleg Dulin Please note my new office #: 732-917-0159
Re: Odd Node Behavior
Most of the time, we got a few timeouts on the failover (unexpected, but not the end of the world) and then quickly recovered; For read or write requests ? I'm guessing with 3 nodes you are using RF 3. In cassandra 1.x the read repair chance is only 10%, so 90% of the time only CL nodes are involved in a read request. If one of the nodes involved dies during the request the coordinator will time out waiting. We see B making a request in the logs (on debug) and 10 seconds later timing out. We see nothing happening in C's log (also debug). What were the log messages from the nodes ? In particular the ones from the StorageProxy on Node B and RowMutationVerbHandler on node C. In retrospect, I should have put it in trace (will do this next time) TRACE logs a lot of stuff. I'd hold off on that. I also noticed a few other crazy log messages on C in that time period. What were the log messages ? There were two instances of invalid protocol header, which in code seems to only happen when PROTOCOL_MAGIC doesn't match (MessagingService.java), which seems like an impossible state. Often means something other than Cassandra connected on the port. Cheers - Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 15/05/2012, at 1:00 AM, E S wrote: Hello, I am having some very strange issues with a cassandra setup. I recognize that this is not the ideal cluster setup, but I'd still like to try and understand what is going wrong. The cluster has 3 machines (A,B,C) running Cassandra 1.0.9 with JNA. A B are in datacenter1 while C is in datacenter2. Cassandra knows about the different datacenter because of the rack inferred snitch. However, we are currently using a simple placement strategy on the keyspace. All reads and writes are done with quorum. Hinted handoffs are enabled. Most the the cassandra settings are at their defaults, with the exception of thrift message sizes, which we have upped to 256 mb (while very rare, we can sometimes have a few larger rows so wanted a big buffer). There is a firewall between the two datacenters. We have enabled TCP traffic for the thrift and storage ports (but not JMX, and no UDP) Another odd thing is that there are actually 2 cassandra clusters hosted on these machines (although with the same setup). Each machine has 2 cassandra processes, but everything is running on different ports and different cluster names. On one of the two clusters we were doing some failover testing. We would take nodes down quickly in succession and make sure sure the system remained up. Most of the time, we got a few timeouts on the failover (unexpected, but not the end of the world) and then quickly recovered; however, twice we were able to put the cluster in an unusable state. We found that sometimes node C, while seemingly up (no load, and marked as UP in the ring by other nodes), was unresponsive to B (when A was down) when B was coordinating a quorum write. We see B making a request in the logs (on debug) and 10 seconds later timing out. We see nothing happening in C's log (also debug). The box is just idling. In retrospect, I should have put it in trace (will do this next time). We had it come back after 30 minutes once. Another time, it came back earlier after cycling it. I also noticed a few other crazy log messages on C in that time period. There were two instances of invalid protocol header, which in code seems to only happen when PROTOCOL_MAGIC doesn't match (MessagingService.java), which seems like an impossible state. I'm currently at a loss trying to explain what is going on. Has anyone seen anything like this? I'd appreciate any additional debugging ideas! Thanks for any help. Regards, Eddie
Re: Does or will Cassandra support OpenJDK ?
To get the latest sun java 6 JRE on a ubuntu machine using apt-get I've used the instructions here https://help.ubuntu.com/community/Java#JRE_only I've also use open JDK for java 6 on ubuntu without issue. You will want to edit cassandra-env.sh to enable the jamm memory meter though, just comment out the if statement and leave the JVM_OPS… line un commented. Cheers - Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 15/05/2012, at 2:33 AM, Jeremiah Jordan wrote: Open JDK is java 1.7. Once Cassandra supports Java 1.7 it would most likely work on Open JDK, as the 1.7 Open JDK really is the same thing as Oracle JDK 1.7 without some licensed stuff. -Jeremiah On May 11, 2012, at 10:02 PM, ramesh wrote: I've had problem downloading the Sun (Oracle) JDK and found this thread where the Oracle official is insisting or rather forcing Linux users to move to OpenJDK. Here is the thread https://forums.oracle.com/forums/thread.jspa?threadID=2365607 I need this because I run Cassandra. Just curious to know if I would be able to avoid the pain of using Sun JDK in future for production Cassandra ? regards Ramesh
Re: live ratio counting
Are you experiencing memory pressure you think may be attributed to memtables not being flushed frequently enough ? Try reducing memtable_total_space_in_mb config setting. If the problem is incorrect memory metering that should help. i have 3 workload types running in batch. Delete only workload, insert only and heavy update (lot of overwrites) Are you saying you do a lot of deletes, followed by a lot of inserts and then updates all for the same CF ? yes. Record is about 120, but it is rare. 80 should be good enough. Default 10 (if not jusing jamm) is way too low. Can you provide some information on what is stored in the CF and what sort of workload. It would be interesting to understand why the real memory usage is 120 times the serialised size. Cheers - Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 15/05/2012, at 1:50 AM, Radim Kolar wrote: liveratio calculation logic also needs to be changed because it is based on assumption that workloads do not change. Can you give an example of the sort of workload change you are thinking of ? i have 3 workload types running in batch. Delete only workload, insert only and heavy update (lot of overwrites) raise maximum liveratio from 64 to at least 80. Have you seen examples in your logs where the calculated live ratio was between 64 and 80 ? yes. Record is about 120, but it is rare. 80 should be good enough. Default 10 (if not jusing jamm) is way too low. Are you experiencing memory pressure you think may be attributed to memtables not being flushed frequently enough ? yes
Re: cassandra initial script does not take default cluster_name
Looks like a formatting error in the yaml file. Cheers - Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 15/05/2012, at 8:12 AM, jk2mhm wrote: when I tried to start my first Cassandra service instance, i got following error message, JavaBean=org.apache.cassandra.config.Config@7c2e1f1f; No single argument constructor found for class [Ljava.lang.String; in reader, line 10, column 1: cluster_name: 'testCluster' I have Java 1.6 and set commitlog, data and saved_caches in cassandra.yxml full log: INFO [main] 2012-05-14 13:05:43,655 AbstractCassandraDaemon.java (line 100) Logging initialized INFO [main] 2012-05-14 13:05:43,659 AbstractCassandraDaemon.java (line 121) JVM vendor/version: Java HotSpot(TM) 64-Bit Server VM/1.6.0_26 INFO [main] 2012-05-14 13:05:43,659 AbstractCassandraDaemon.java (line 122) Heap size: 1060372480/1060372480 INFO [main] 2012-05-14 13:05:43,659 AbstractCassandraDaemon.java (line 123) Classpath: C:\apache-cassandra-1.1.0\conf;C:\apache-cassandra-1.1.0\lib\antlr- 3.2.jar;C:\apache-cassandra-1.1.0\lib\apache-cassandra-1.1.0.jar;C:\apache- cassandra-1.1.0\lib\apache-cassandra-clientutil-1.1.0.jar;C:\apache-cassandra- 1.1.0\lib\apache-cassandra-thrift-1.1.0.jar;C:\apache-cassandra-1.1.0\lib\avro- 1.4.0-fixes.jar;C:\apache-cassandra-1.1.0\lib\avro-1.4.0-sources- fixes.jar;C:\apache-cassandra-1.1.0\lib\commons-cli-1.1.jar;C:\apache- cassandra- 1.1.0\lib\commons-codec-1.2.jar;C:\apache-cassandra-1.1.0\lib\commons-lang- 2.4.jar;C:\apache-cassandra-1.1.0\lib\compress-lzf-0.8.4.jar;C:\apache- cassandra-1.1.0\lib\concurrentlinkedhashmap-lru-1.2.jar;C:\apache-cassandra- 1.1.0\lib\guava-r08.jar;C:\apache-cassandra-1.1.0\lib\high-scale-lib- 1.1.2.jar;C:\apache-cassandra-1.1.0\lib\jackson-core-asl-1.9.2.jar;C:\apache- cassandra-1.1.0\lib\jackson-mapper-asl-1.9.2.jar;C:\apache-cassandra- 1.1.0\lib\jamm-0.2.5.jar;C:\apache-cassandra-1.1.0\lib\jline- 0.9.94.jar;C:\apache-cassandra-1.1.0\lib\json-simple-1.1.jar;C:\apache- cassandra-1.1.0\lib\libthrift-0.7.0.jar;C:\apache-cassandra-1.1.0\lib\log4j- 1.2.16.jar;C:\apache-cassandra-1.1.0\lib\metrics-core-2.0.3.jar;C:\apache- cassandra-1.1.0\lib\servlet-api-2.5-20081211.jar;C:\apache-cassandra- 1.1.0\lib\slf4j-api-1.6.1.jar;C:\apache-cassandra-1.1.0\lib\slf4j-log4j12- 1.6.1.jar;C:\apache-cassandra-1.1.0\lib\snakeyaml-1.6.jar;C:\apache-cassandra- 1.1.0\lib\snappy-java-1.0.4.1.jar;C:\apache-cassandra-1.1.0\lib\snaptree- 0.1.jar;C:\apache-cassandra-1.1.0\build\classes\main;C:\apache-cassandra- 1.1.0\build\classes\thrift;C:\apache-cassandra-1.1.0\lib\jamm-0.2.5.jar INFO [main] 2012-05-14 13:05:43,662 CLibrary.java (line 66) JNA not found. Native methods will be disabled. INFO [main] 2012-05-14 13:05:43,670 DatabaseDescriptor.java (line 127) Loading settings from file:/C:/apache-cassandra-1.1.0/conf/cassandra.yaml ERROR [main] 2012-05-14 13:05:43,762 DatabaseDescriptor.java (line 479) Fatal configuration error error Can't construct a java object for tag:yaml.org,2002:org.apache.cassandra.config.Config; exception=Cannot create property=data_file_directories for JavaBean=org.apache.cassandra.config.Config@7c2e1f1f; No single argument constructor found for class [Ljava.lang.String; in reader, line 10, column 1: cluster_name: 'testCluster' ^ at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct (Constru ctor.java:372) at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject (BaseConstructor.j ava:177) at org.yaml.snakeyaml.constructor.BaseConstructor.constructDocument (BaseConstructor .java:136) at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData (BaseConstructor.jav a:122) at org.yaml.snakeyaml.Loader.load(Loader.java:52) at org.yaml.snakeyaml.Yaml.load(Yaml.java:166) at org.apache.cassandra.config.DatabaseDescriptor.loadYaml (DatabaseDescriptor.java: 143) at org.apache.cassandra.config.DatabaseDescriptor.clinit (DatabaseDescriptor.java:118) at org.apache.cassandra.service.AbstractCassandraDaemon.setup (AbstractCassandraDaem on.java:126) at org.apache.cassandra.service.AbstractCassandraDaemon.activate (AbstractCassandraD aemon.java:353) at org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:106) Caused by: org.yaml.snakeyaml.error.YAMLException: Cannot create property=data_file_directories for JavaBean=org.apache.cassandra.config.Config@7c2e1f1f; No single argument constructor found for class [Ljava.lang.String; at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2n d Step(Constructor.java:305) at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.construct (Constructo r.java:184) at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct (Constru ctor.java:370)
Re: cassandra initial script does not take default cluster_name
aaron morton aaron at thelastpickle.com writes: Looks like a formatting error in the yaml file. Cheers - Aaron Morton Freelance Developer at aaronmorton http://www.thelastpickle.com On 15/05/2012, at 8:12 AM, jk2mhm wrote: when I tried to start my first Cassandra service instance, i got following error message, JavaBean=org.apache.cassandra.config.Config at 7c2e1f1f; No single argument constructor found for class [Ljava.lang.String; in reader, line 10, column 1: cluster_name: 'testCluster'I have Java 1.6 and set commitlog, data and saved_caches in cassandra.yxmlfull log:INFO [main] 2012-05- 14 13:05:43,655 AbstractCassandraDaemon.java (line 100) Logging initialized INFO [main] 2012-05-14 13:05:43,659 AbstractCassandraDaemon.java (line 121) JVM vendor/version: Java HotSpot(TM) 64-Bit Server VM/1.6.0_26 INFO [main] 2012-05- 14 13:05:43,659 AbstractCassandraDaemon.java (line 122) Heap size: 1060372480/1060372480 INFO [main] 2012-05-14 13:05:43,659 AbstractCassandraDaemon.java (line 123) Classpath: C:\apache-cassandra- 1.1.0\conf;C:\apache-cassandra-1.1.0\lib\antlr-3.2.jar;C:\apache-cassandra- 1.1.0\lib\apache-cassandra-1.1.0.jar;C:\apache-cassandra-1.1.0\lib\apache- cassandra-clientutil-1.1.0.jar;C:\apache-cassandra-1.1.0\lib\apache-cassandra- thrift-1.1.0.jar;C:\apache-cassandra-1.1.0\lib\avro-1.4.0-fixes.jar;C:\apache- cassandra-1.1.0\lib\avro-1.4.0-sources-fixes.jar;C:\apache-cassandra- 1.1.0\lib\commons-cli-1.1.jar;C:\apache-cassandra-1.1.0\lib\commons-codec- 1.2.jar;C:\apache-cassandra-1.1.0\lib\commons-lang-2.4.jar;C:\apache-cassandra- 1.1.0\lib\compress-lzf-0.8.4.jar;C:\apache-cassandra- 1.1.0\lib\concurrentlinkedhashmap-lru-1.2.jar;C:\apache-cassandra- 1.1.0\lib\guava-r08.jar;C:\apache-cassandra-1.1.0\lib\high-scale-lib- 1.1.2.jar;C:\apache-cassandra-1.1.0\lib\jackson-core-asl-1.9.2.jar;C:\apache- cassandra-1.1.0\lib\jackson-mapper-asl-1.9.2.jar;C:\apache-cassandra- 1.1.0\lib\jamm-0.2.5.jar;C:\apache-cassandra-1.1.0\lib\jline- 0.9.94.jar;C:\apache-cassandra-1.1.0\lib\json-simple-1.1.jar;C:\apache- cassandra-1.1.0\lib\libthrift-0.7.0.jar;C:\apache-cassandra-1.1.0\lib\log4j- 1.2.16.jar;C:\apache-cassandra-1.1.0\lib\metrics-core-2.0.3.jar;C:\apache- cassandra-1.1.0\lib\servlet-api-2.5-20081211.jar;C:\apache-cassandra- 1.1.0\lib\slf4j-api-1.6.1.jar;C:\apache-cassandra-1.1.0\lib\slf4j-log4j12- 1.6.1.jar;C:\apache-cassandra-1.1.0\lib\snakeyaml-1.6.jar;C:\apache-cassandra- 1.1.0\lib\snappy-java-1.0.4.1.jar;C:\apache-cassandra-1.1.0\lib\snaptree- 0.1.jar;C:\apache-cassandra-1.1.0\build\classes\main;C:\apache-cassandra- 1.1.0\build\classes\thrift;C:\apache-cassandra-1.1.0\lib\jamm-0.2.5.jar INFO [main] 2012-05-14 13:05:43,662 CLibrary.java (line 66) JNA not found. Native methods will be disabled. INFO [main] 2012-05-14 13:05:43,670 DatabaseDescriptor.java (line 127) Loading settings from file:/C:/apache- cassandra-1.1.0/conf/cassandra.yamlERROR [main] 2012-05-14 13:05:43,762 DatabaseDescriptor.java (line 479) Fatal configuration error errorCan't construct a java object for tag:yaml.org,2002:org.apache.cassandra.config.Config; exception=Cannot create property=data_file_directories for JavaBean=org.apache.cassandra.config.Config at 7c2e1f1f; No single argument constructor found for class [Ljava.lang.String; in reader, line 10, column 1: cluster_name: 'testCluster' ^ at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constru ctor.java:372) at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.j ava:177)at org.yaml.snakeyaml.constructor.BaseConstructor.constructDocument(BaseConstructor .java:136) at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.jav a:122) at org.yaml.snakeyaml.Loader.load(Loader.java:52) at org.yaml.snakeyaml.Yaml.load(Yaml.java:166) at org.apache.cassandra.config.DatabaseDescriptor.loadYaml(DatabaseDescriptor.java: 143)at org.apache.cassandra.config.DatabaseDescriptor.clinit (DatabaseDescriptor.java:118) at org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassandraDaem on.java:126)at org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraD aemon.java:353) at org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:106)Caused by: org.yaml.snakeyaml.error.YAMLException: Cannot create property=data_file_directories for JavaBean=org.apache.cassandra.config.Config at 7c2e1f1f; No single argument constructor found for class [Ljava.lang.String; at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2nd Step(Constructor.java:305) at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.construct(Constructo r.java:184) at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constru ctor.java:370) ... 10 moreCaused by: org.yaml.snakeyaml.error.YAMLException: No single
Re: cassandra initial script does not take default cluster_name
yaml is very particular about the difference between cluster_name: mycluster and cluster_name:myfluster It is also very particular about the difference between data_file_directories: - /var/lib/cassandra/data and data_file_directories: - /var/lib/cassandra/data Maybe Cassandra can switch to a more well known format like XML to avoid the confusing YAML error messages and not well known and understood formatting rules JK :) On Mon, May 14, 2012 at 7:01 PM, jk2mhm jk2...@yahoo.com wrote: aaron morton aaron at thelastpickle.com writes: Looks like a formatting error in the yaml file. Cheers - Aaron Morton Freelance Developer at aaronmorton http://www.thelastpickle.com On 15/05/2012, at 8:12 AM, jk2mhm wrote: when I tried to start my first Cassandra service instance, i got following error message, JavaBean=org.apache.cassandra.config.Config at 7c2e1f1f; No single argument constructor found for class [Ljava.lang.String; in reader, line 10, column 1: cluster_name: 'testCluster'I have Java 1.6 and set commitlog, data and saved_caches in cassandra.yxmlfull log:INFO [main] 2012-05- 14 13:05:43,655 AbstractCassandraDaemon.java (line 100) Logging initialized INFO [main] 2012-05-14 13:05:43,659 AbstractCassandraDaemon.java (line 121) JVM vendor/version: Java HotSpot(TM) 64-Bit Server VM/1.6.0_26 INFO [main] 2012-05- 14 13:05:43,659 AbstractCassandraDaemon.java (line 122) Heap size: 1060372480/1060372480 INFO [main] 2012-05-14 13:05:43,659 AbstractCassandraDaemon.java (line 123) Classpath: C:\apache-cassandra- 1.1.0\conf;C:\apache-cassandra-1.1.0\lib\antlr-3.2.jar;C:\apache-cassandra- 1.1.0\lib\apache-cassandra-1.1.0.jar;C:\apache-cassandra-1.1.0\lib\apache- cassandra-clientutil-1.1.0.jar;C:\apache-cassandra-1.1.0\lib\apache-cassandra- thrift-1.1.0.jar;C:\apache-cassandra-1.1.0\lib\avro-1.4.0-fixes.jar;C:\apache- cassandra-1.1.0\lib\avro-1.4.0-sources-fixes.jar;C:\apache-cassandra- 1.1.0\lib\commons-cli-1.1.jar;C:\apache-cassandra-1.1.0\lib\commons-codec- 1.2.jar;C:\apache-cassandra-1.1.0\lib\commons-lang-2.4.jar;C:\apache-cassandra- 1.1.0\lib\compress-lzf-0.8.4.jar;C:\apache-cassandra- 1.1.0\lib\concurrentlinkedhashmap-lru-1.2.jar;C:\apache-cassandra- 1.1.0\lib\guava-r08.jar;C:\apache-cassandra-1.1.0\lib\high-scale-lib- 1.1.2.jar;C:\apache-cassandra-1.1.0\lib\jackson-core-asl-1.9.2.jar;C:\apache- cassandra-1.1.0\lib\jackson-mapper-asl-1.9.2.jar;C:\apache-cassandra- 1.1.0\lib\jamm-0.2.5.jar;C:\apache-cassandra-1.1.0\lib\jline- 0.9.94.jar;C:\apache-cassandra-1.1.0\lib\json-simple-1.1.jar;C:\apache- cassandra-1.1.0\lib\libthrift-0.7.0.jar;C:\apache-cassandra-1.1.0\lib\log4j- 1.2.16.jar;C:\apache-cassandra-1.1.0\lib\metrics-core-2.0.3.jar;C:\apache- cassandra-1.1.0\lib\servlet-api-2.5-20081211.jar;C:\apache-cassandra- 1.1.0\lib\slf4j-api-1.6.1.jar;C:\apache-cassandra-1.1.0\lib\slf4j-log4j12- 1.6.1.jar;C:\apache-cassandra-1.1.0\lib\snakeyaml-1.6.jar;C:\apache-cassandra- 1.1.0\lib\snappy-java-1.0.4.1.jar;C:\apache-cassandra-1.1.0\lib\snaptree- 0.1.jar;C:\apache-cassandra-1.1.0\build\classes\main;C:\apache-cassandra- 1.1.0\build\classes\thrift;C:\apache-cassandra-1.1.0\lib\jamm-0.2.5.jar INFO [main] 2012-05-14 13:05:43,662 CLibrary.java (line 66) JNA not found. Native methods will be disabled. INFO [main] 2012-05-14 13:05:43,670 DatabaseDescriptor.java (line 127) Loading settings from file:/C:/apache- cassandra-1.1.0/conf/cassandra.yamlERROR [main] 2012-05-14 13:05:43,762 DatabaseDescriptor.java (line 479) Fatal configuration error errorCan't construct a java object for tag:yaml.org,2002:org.apache.cassandra.config.Config; exception=Cannot create property=data_file_directories for JavaBean=org.apache.cassandra.config.Config at 7c2e1f1f; No single argument constructor found for class [Ljava.lang.String; in reader, line 10, column 1: cluster_name: 'testCluster' ^ at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constru ctor.java:372) at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.j ava:177) at org.yaml.snakeyaml.constructor.BaseConstructor.constructDocument(BaseConstructor .java:136) at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.jav a:122) at org.yaml.snakeyaml.Loader.load(Loader.java:52) at org.yaml.snakeyaml.Yaml.load(Yaml.java:166) at org.apache.cassandra.config.DatabaseDescriptor.loadYaml(DatabaseDescriptor.java: 143) at org.apache.cassandra.config.DatabaseDescriptor.clinit (DatabaseDescriptor.java:118) at org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassandraDaem on.java:126) at org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraD aemon.java:353) at org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:106)Caused by: org.yaml.snakeyaml.error.YAMLException: Cannot create property=data_file_directories for
Re: How do I add a custom comparator class to a cassandra cluster ?
Can I put this comparator class in a separate new jar(with just this single file) or is it to be appended to the original jar along with the other comparator classes? On Tue, May 15, 2012 at 12:22 AM, Tom Duffield (Mailing Lists) tom.duffield.li...@gmail.com wrote: Kirk is correct. -- Tom Duffield (Mailing Lists) Sent with Sparrow http://www.sparrowmailapp.com/?sig On Monday, May 14, 2012 at 1:41 PM, Kirk True wrote: Disclaimer: I've never tried, but I'd imagine you can drop a JAR containing the class(es) into the lib directory and perform a rolling restart of the nodes. On 5/14/12 11:11 AM, Ertio Lew wrote: I need to add a custom comparator to a cluster, to sort columns in a certain customized fashion. How do I add the class to the cluster ?
Re: How do I add a custom comparator class to a cassandra cluster ?
it can be in a separate jar with just one class. On 05/15/2012 12:29 AM, Ertio Lew wrote: Can I put this comparator class in a separate new jar(with just this single file) or is it to be appended to the original jar along with the other comparator classes? On Tue, May 15, 2012 at 12:22 AM, Tom Duffield (Mailing Lists) tom.duffield.li...@gmail.com mailto:tom.duffield.li...@gmail.com wrote: Kirk is correct. -- Tom Duffield (Mailing Lists) Sent with Sparrow http://www.sparrowmailapp.com/?sig On Monday, May 14, 2012 at 1:41 PM, Kirk True wrote: Disclaimer: I've never tried, but I'd imagine you can drop a JAR containing the class(es) into the lib directory and perform a rolling restart of the nodes. On 5/14/12 11:11 AM, Ertio Lew wrote: I need to add a custom comparator to a cluster, to sort columns in a certain customized fashion. How do I add the class to the cluster ?
Re: How can I implement 'LIKE operation in SQL' on values while querying a column family in Cassandra
I don't think this is possible, the best you can do is prefix, if your order is alphabetical. For example I have a CF with comparator UTF8Type, and then I can do slice query and bring all columns that start with the prefix, and end with the prefix where you replace the last char with the next one in order (i.e. aaa-aab). Hope that helps. *Tamar Fraenkel * Senior Software Engineer, TOK Media [image: Inline image 1] ta...@tok-media.com Tel: +972 2 6409736 Mob: +972 54 8356490 Fax: +972 2 5612956 On Tue, May 15, 2012 at 7:56 AM, Abhijit Chanda abhijit.chan...@gmail.comwrote: I don't know the exact value on a column, but I want to do a partial matching to know all available values that matches. I want to do similar kind of operation that LIKE operator in SQL do. Any help is highly appreciated. -- Abhijit Chanda Software Developer VeHere Interactive Pvt. Ltd. +91-974395 tokLogo.png
Re: Counter CF and TTL
Thanks *Tamar Fraenkel * Senior Software Engineer, TOK Media [image: Inline image 1] ta...@tok-media.com Tel: +972 2 6409736 Mob: +972 54 8356490 Fax: +972 2 5612956 On Mon, May 14, 2012 at 11:43 PM, aaron morton aa...@thelastpickle.comwrote: Counter columns do not support a TTL. Cheers - Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 15/05/2012, at 12:20 AM, Tamar Fraenkel wrote: Hi! I saw that when Counter CF were first introduced there was no support for TTL. CLI does not provide TTL for counter columns. Hector does seem to provide an interface for setting TTL for HCounterColumn, but when I list the content of the CF I don't see the TTL as I see for regular CFs. So does a counter column have TTL or not? I actually don't have an issue of big rows, but I don't need the data after a two weeks or so, so it seems a shame to clutter the DB with it. Thanks, *Tamar Fraenkel * Senior Software Engineer, TOK Media tokLogo.png ta...@tok-media.com Tel: +972 2 6409736 Mob: +972 54 8356490 Fax: +972 2 5612956 tokLogo.png
Re: How do I add a custom comparator class to a cassandra cluster ?
On Mon, May 14, 2012 at 1:11 PM, Ertio Lew ertio...@gmail.com wrote: I need to add a custom comparator to a cluster, to sort columns in a certain customized fashion. How do I add the class to the cluster ? I highly recommend against doing this, because you'll be locked in to your comparator and not have an easy way out. I dare say if none of the currently available comparators meet your needs, you're doing something wrong. -Brandon
Re: How do I add a custom comparator class to a cassandra cluster ?
@Brandon : I just created a jira issue to request this type of comparator along with Cassandra. It is about a UTF8 comparator that provides case insensitive ordering of columns. See issue here : https://issues.apache.org/jira/browse/CASSANDRA-4245 On Tue, May 15, 2012 at 11:14 AM, Brandon Williams dri...@gmail.com wrote: On Mon, May 14, 2012 at 1:11 PM, Ertio Lew ertio...@gmail.com wrote: I need to add a custom comparator to a cluster, to sort columns in a certain customized fashion. How do I add the class to the cluster ? I highly recommend against doing this, because you'll be locked in to your comparator and not have an easy way out. I dare say if none of the currently available comparators meet your needs, you're doing something wrong. -Brandon