Re: scala 2.8 client

2010-03-16 Thread Jonathan Ellis
Added to http://wiki.apache.org/cassandra/ClientExamples, thanks Cliff! On Tue, Mar 16, 2010 at 11:11 PM, Cliff Moon wrote: > I just released 0.1 a jar for the Scala 2.8 cassandra client I've been > working on.  The library is called scromium and it's hosted on github: > http://github.com/cliffmo

scala 2.8 client

2010-03-16 Thread Cliff Moon
I just released 0.1 a jar for the Scala 2.8 cassandra client I've been working on. The library is called scromium and it's hosted on github: http://github.com/cliffmoon/scromium I wouldn't really recommend it for production use at the moment, but if people want to play with it I think it expo

Re: Cassandra cookbook for Chef

2010-03-16 Thread Benjamin Black
Someone on #cassandra asked about an EC2-aware placement strategy, so I whipped up a basic recipe to generate a config file for contrib/property_snitch to use availability zone information and added it to the cookbook. I don't use Cassandra on EC2 and this is totally untested, so please try it and

Re: failover exception with hector

2010-03-16 Thread Ran Tavory
I seems the host you were connected to was unable to locate the other host in the ring. That's probably a configuration error. Can you run nodeprobe -host1 ring where host1 is the host hector was connected to initially? If not that, can you check with jconsole how hector sees the ring: connect to

failover exception with hector

2010-03-16 Thread casablinca126.com
hi folks, Just switched from C++ interface to hector, found an exception when testing with a 2-node cluster: Exception in thread "main" org.apache.thrift.TException: Unable to failover to next host at me.prettyprint.cassandra.service.KeyspaceImpl.ski

Re: Re: Re: SuperColumns in C++ API

2010-03-16 Thread casablinca126.com
Juan, check the attached source file . Cao Jiguang 2010-03-17 casablinca126.com 发件人: Juan Manuel Garcia del Moral 发送时间: 2010-03-17 00:09:53 收件人: user@cassandra.apache.org 抄送: 主题: Re: Re: SuperColumns in C++ API Many thanks for your code, would you please send me the get_slice() fu

Re: Running on Windows

2010-03-16 Thread Jonathan Ellis
On Mon, Mar 15, 2010 at 11:41 PM, Jesus Ibanez wrote: > To run Cassandra on Windows, after executing bin\cassandra without problems, > we need to insert the line if NOT DEFINED CASSANDRA_HOME set > CASSANDRA_HOME=%CD% into the cassandra-cli.bat file before we execute it. > That line is missing in

Re: get_range_slice(s) question

2010-03-16 Thread Omer van der Horst Jansen
Thank you! I hope to get around to testing your patches Thursday morning. On Tue, Mar 16, 2010 at 4:59 PM, Jonathan Ellis wrote: > Thanks for the patch! > > Since we've had some jira notification whackiness -- I just attached a > v2 patch and commented. > > On Tue, Mar 16, 2010 at 3:43 PM, Omer v

Re: Dividing the client load between machines in Cassandra

2010-03-16 Thread Sonny Heer
Is there some example code on how to do this? On Tue, Mar 16, 2010 at 3:07 PM, Jonathan Ellis wrote: > token map is an internal representation, so returning the internal IPs > is correct, even though this makes it slightly more difficult to use > for thrift clients. > > On Tue, Mar 16, 2010 at 4:

Re: got a SocketException: Software caused connection abort: socket write error

2010-03-16 Thread DonYang
thanks, it works I also find this on FAQ -- What ports does Cassandra use? By default, Cassandra uses 7000 and 7001 for cluster communication, 9160 for clients (Thrift), for java remote debugging,

Re: Dividing the client load between machines in Cassandra

2010-03-16 Thread Jonathan Ellis
token map is an internal representation, so returning the internal IPs is correct, even though this makes it slightly more difficult to use for thrift clients. On Tue, Mar 16, 2010 at 4:55 PM, B. Todd Burruss wrote: > if you choose #3 - get_string_property("token map") - keep in mind that the > I

Re: got a SocketException: Software caused connection abort: socket write error

2010-03-16 Thread Roger Schildmeijer
Try connect localhost/9160 instead On 16 mar 2010, at 22.59em, DonYang wrote: > the problem: > - > cassandra> connect localhost/ > Connected to localhost/ > cass

got a SocketException: Software caused connection abort: socket write error

2010-03-16 Thread DonYang
the problem: - cassandra> connect localhost/ Connected to localhost/ cassandra> show version Exception java.net.SocketException: Software caused connection abort:

Re: cassandra not responding

2010-03-16 Thread B. Todd Burruss
i am just reading/writing 4k+/-1k of data to a single column in a single column family. i do some writes of fresh data and some read/write of existing data. i will end up in the 100 million row range, maintaining about a 2 million row of "hot data". so i have small rows, but _lots_ of them.

Re: Dividing the client load between machines in Cassandra

2010-03-16 Thread B. Todd Burruss
if you choose #3 - get_string_property("token map") - keep in mind that the IPs returned from this call are the IPs used for "ListenAddress" param in storage-conf.xml. In my case we have two NICs and I set this to be an IP that is only for "node to node" communication. The "ThriftAddress" par

Re: Dividing the client load between machines in Cassandra

2010-03-16 Thread Jonathan Ellis
http://wiki.apache.org/cassandra/FAQ#node_clients_connect_to On Tue, Mar 16, 2010 at 4:30 PM, Sonny Heer wrote: > How can I accomplish this? > > The way I'm doing it now it is creating a TSocket connection using a > static IP of one of the boxes on Cassandra: >        TTransport tr = new TSocket(

Re: Dividing the client load between machines in Cassandra

2010-03-16 Thread Tom Chen
Try using the cassandra hector client. It has failover and load balancing built in. http://github.com/rantav/hector Tom On Tue, Mar 16, 2010 at 2:30 PM, Sonny Heer wrote: > How can I accomplish this? > > The way I'm doing it now it is creating a TSocket conne

try, catch, throw with client.get()

2010-03-16 Thread Juan Manuel Garcia del Moral
Hello I'm a bit new on C++ Programming as well as Cassandra API, I need to catch the error that the client.get() throws if the column does not exist, and return(0) to the calling function... Any of you have a code with this method implemented within a try/catch block ? thanks Juan

Dividing the client load between machines in Cassandra

2010-03-16 Thread Sonny Heer
How can I accomplish this? The way I'm doing it now it is creating a TSocket connection using a static IP of one of the boxes on Cassandra: TTransport tr = new TSocket(host, port.intValue()); TProtocol proto = new TBinaryProtocol(tr); Cassandra.Client client = new Cassandra

Re: get_range_slice(s) question

2010-03-16 Thread Jonathan Ellis
Thanks for the patch! Since we've had some jira notification whackiness -- I just attached a v2 patch and commented. On Tue, Mar 16, 2010 at 3:43 PM, Omer van der Horst Jansen wrote: > The ticket is here: https://issues.apache.org/jira/browse/CASSANDRA-884 > > I've attached a patch there that se

Re: cassandra not responding

2010-03-16 Thread Tom Chen
Can you give some details about the use case that you are using cassandra for? I am actually looking to store almost the data in the same manner, except with more of a variance in data 1k to 5k with about 20 million rows. I have been benchmarking cassandra on 5 verses 6, and v6 has significant sp

Re: get_range_slice(s) question

2010-03-16 Thread Omer van der Horst Jansen
The ticket is here: https://issues.apache.org/jira/browse/CASSANDRA-884 I've attached a patch there that seems to fix the problem. Has anybody else seen this behavior? > That would be a bug, not intended behavior. Can you open a ticket? > > On Fri, Mar 12, 2010 at 11:48 AM, Omer van der Horst

Re: cassandra not responding

2010-03-16 Thread B. Todd Burruss
i only anticipate about 2,000,000 hot rows, each with about 4k of data. however, we will have a LOT of rows that just aren't used. right now, the data is just one column with a blob of text in it. but i have new data coming in constantly, so not sure how this affects the cache, etc. i'm ske

Re: cassandra not responding

2010-03-16 Thread Nathan McCall
The cache is a "second-chance FIFO" from this library: http://code.google.com/p/concurrentlinkedhashmap/source/browse/trunk/src/java/com/reardencommerce/kernel/collections/shared/evictable/ConcurrentLinkedHashMap.java That sounds like an awful lot of churn given the size of the queue and the numbe

Re: cassandra not responding

2010-03-16 Thread Jonathan Ellis
Right. As a rule of thumb you should only use one of {key cache, row cache} at a time on a given CF. On Tue, Mar 16, 2010 at 3:17 PM, B. Todd Burruss wrote: > i think i better make sure i understand how the row/key cache works.  i > currently have both set to 10%.  so if cassandra needs to read

Re: cassandra not responding

2010-03-16 Thread Jonathan Ellis
it could be the "really big row during compaction" limitation, then, too. On Tue, Mar 16, 2010 at 3:04 PM, B. Todd Burruss wrote: > the row/key cache is set to 10%, but memory usage stays good until an > anticompaction, hinted handoff, etc starts.  (of course maybe i simply don't > pay attention

Re: cassandra not responding

2010-03-16 Thread B. Todd Burruss
i think i better make sure i understand how the row/key cache works. i currently have both set to 10%. so if cassandra needs to read data from an sstable that has 100 million rows, it will cache 10,000,000 rows of data from that sstable? so if my row is ~4k, then we're looking at ~40gb used

Re: cassandra not responding

2010-03-16 Thread B. Todd Burruss
the row/key cache is set to 10%, but memory usage stays good until an anticompaction, hinted handoff, etc starts. (of course maybe i simply don't pay attention to memory until something bad happens) doesn't sound like anyone else is having trouble, so i'll keep review my settings for cache, k

Re: cassandra not responding

2010-03-16 Thread Jonathan Ellis
it's almost certainly GC storming due to memory pressure. (matching the thread dump / the threads using the CPU in top will confirm this.) reducing your cache sizes might be the best option since you already have a 44GB heap. On Tue, Mar 16, 2010 at 12:17 PM, B. Todd Burruss wrote: > thx, i'll t

C++ API - get SuperColumn Values

2010-03-16 Thread Juan Manuel Garcia del Moral
Hi there Any of you have a code as example of getting supercolumn values from a Cassandra Server, from a C++ code? I'm trying to do it like this: ColumnPath new_col; new_col.__isset.super_column = true; new_col.__isset.column = true; /* this is required! */ new_col.column_famil

Sparse vs dense index

2010-03-16 Thread alex kamil
which index structure would fit Cassandra more naturally and perform better: 1) a sparse index where in each row there are 100 columns each containing a 5MB data block (under a single column family) or 2) a dense index where each row contains 100 columns with a single 6bytes value (under a single

Re: cassandra not responding

2010-03-16 Thread B. Todd Burruss
thx, i'll try that next time, already restarted node .. but i will say the exact thing happened on another node as well. Jonathan Ellis wrote: You can still get a thread list w/ jstack, though. On Tue, Mar 16, 2010 at 11:46 AM, Gary Dusbabek wrote: On Tue, Mar 16, 2010 at 11:39, B. Todd B

Re: cassandra not responding

2010-03-16 Thread Jonathan Ellis
You can still get a thread list w/ jstack, though. On Tue, Mar 16, 2010 at 11:46 AM, Gary Dusbabek wrote: > On Tue, Mar 16, 2010 at 11:39, B. Todd Burruss wrote: >> any other ideas on how to troubleshoot?  i have tried kill -3 in >> the past but don't know where cassandra writes the console out

Cassandra and Grails

2010-03-16 Thread Ned Wolpert
Folks- I released a grails plugin that gives access to Cassandra. Its available at github (http://github.com/wolpert/grails-cassandra) and through the normal grails plugin distribution. Its pretty basic right now but I wanted to see if someone familiar with Cassandra and grails could test it. (A

Re: cassandra not responding

2010-03-16 Thread Gary Dusbabek
On Tue, Mar 16, 2010 at 11:39, B. Todd Burruss wrote: > any other ideas on how to troubleshoot?  i have tried kill -3 in > the past but don't know where cassandra writes the console out.  i'll look > at scripts. > I have a sneaking suspicion that unless you're running with '-f' that the thread d

cassandra not responding

2010-03-16 Thread B. Todd Burruss
i have a cassandra node that has stopped responding to nodetool tpstats and not processing requests. memory is maxed on the JVM at 44gig. the last i remember seeing from tpstats was over 150 hinted handoffs pending. there hasn't been an OOM in the log yet, so not sure. JMX isn't responding

Re: Re: SuperColumns in C++ API

2010-03-16 Thread Juan Manuel Garcia del Moral
Many thanks for your code, would you please send me the get_slice() function as well so I can compile it? thanks in advance Juan 2010/3/15 casablinca126.com > hello Juan, > this is the C++ code with super-column I'm using. I hope it will be > useful : > > #include "Cassandra.h" > #include

Re: TimeUUID

2010-03-16 Thread Jonathan Ellis
cli is a toy, and can't deal with binary values sanely. On Tue, Mar 16, 2010 at 3:42 AM, shirish wrote: > Thank you, But I intend to insert values using the command line interface > (cassandra-cli) I was actually asking on how to do this > > > > On Tue, Mar 16, 2010 at 1:52 PM, Peter Chang wrote

Default Texception

2010-03-16 Thread shirish
Hello, Here is the code that i used to *get_slice* could any one correct me where I went wrong. The code compiles right but gives me a Default TException vector lcosc; SlicePredicate sp; sp.column_names.push_back("thread1"); sp.column_names.push_back("thread2");

Cassandra and hadoop?

2010-03-16 Thread Matteo Caprari
Hi. I've tried the mapreduce example in 0.6 contrib/wordcount and it worked very well. I have a shallow understanding of both worlds, so pardon my questions: Is the integration with hadoop just 'semantic' (ie map/reduce api is only used as query abstraction) or is it 'structural' (ie cassandra c

Re: TimeUUID

2010-03-16 Thread shirish
Got it. Thank you :) On Tue, Mar 16, 2010 at 2:12 PM, shirish wrote: > Thank you, But I intend to insert values using the command line interface > (cassandra-cli) I was actually asking on how to do this > > > > On Tue, Mar 16, 2010 at 1:52 PM, Peter Chang wrote: > >> http://wiki.apache.org/ca

Re: TimeUUID

2010-03-16 Thread shirish
Thank you, But I intend to insert values using the command line interface (cassandra-cli) I was actually asking on how to do this On Tue, Mar 16, 2010 at 1:52 PM, Peter Chang wrote: > http://wiki.apache.org/cassandra/FAQ#working_with_timeuuid_in_java > > > On Tue, Mar 16, 2010 at 1:09 AM, shir

Re: TimeUUID

2010-03-16 Thread Peter Chang
http://wiki.apache.org/cassandra/FAQ#working_with_timeuuid_in_java On Tue, Mar 16, 2010 at 1:09 AM, shirish wrote: > Hello, > > Could any one please point me to any resource or explain it how to use > TimeUUID > I have been trying to insert values in Keyspace1.StandardByUUID1. I get the > follow

TimeUUID

2010-03-16 Thread shirish
Hello, Could any one please point me to any resource or explain it how to use TimeUUID I have been trying to insert values in Keyspace1.StandardByUUID1. I get the following *TimeUUID must be exactly 16 bytes. *and when i give an exact 16 bytes value I get *TimeUUID only makes sense with version