Re: Timeuuid inserted with now(), how to get the value back in Java client?

2014-04-01 Thread Theo Hultberg
no, there's no way. you should generate the TIMEUUID on the client side so that you have it. T# On Sat, Mar 29, 2014 at 1:01 AM, Andy Atj2 wrote: > I'm writing a Java client to a Cassandra db. > > One of the main primary keys is a timeuuid. > > I plan to do INSERTs using now() and have Cassand

Re: Meaning of "token" column in system.peers and system.local

2014-03-31 Thread Theo Hultberg
your assumption about 256 tokens per node is correct. as for you second question, it seems to me like most of your assumptions are correct, but I'm not sure I understand them correctly. hopefully someone else can answer this better. tokens are a property of the cluster and not the keyspace. the fi

Re: Production Quality Ruby Driver?

2014-03-19 Thread Theo Hultberg
And cql-rb is full featured when it comes to CQL3. It supports all features of Cassandra 1.2. For some of the Cassandra 2.0 features you have to wait for a final version of 2.0, but the current prerelease is stable and well tested. yours Theo On Wed, Mar 19, 2014 at 5:21 PM, Theo Hultberg

Re: Production Quality Ruby Driver?

2014-03-19 Thread Theo Hultberg
I'm the author of cql-rb, the first one on your list. It runs in production in systems doing tens of thousands of operations per second. cequel is an ORM and its latest version runs on top of cql-rb. If you decide on using cql-rb I'm happy to help you out with any problems you might have, just ope

Re: Proposal: freeze Thrift starting with 2.1.0

2014-03-12 Thread Theo Hultberg
Speaking as a CQL driver maintainer (Ruby) I'm +1 for end-of-lining Thrift. I agree with Edward that it's unfortunate that there are no official drivers being maintained by the Cassandra maintainers -- even though the current state with the Datastax drivers is in practice very close (it is not the

Re: How to paginate through all columns in a row?

2014-02-27 Thread Theo Hultberg
You can page yourself using the withColumnRange method (see the slice query example on the page you linked to). What you do is that you save the last column you got from the previous query, and you set that as the start of the range you pass to withColumnRange. You don't need to set an end of a ran

Re: How should clients handle the user defined types in 2.1?

2014-02-25 Thread Theo Hultberg
thanks for the high level description of the format, I'll see if I can make a stab at implementing support for custom types now. and maybe I should take all of the reverse engineering I've done of the type encoding and decoding and send a pull request for the protocol spec, or write an appendix.

Re: How should clients handle the user defined types in 2.1?

2014-02-24 Thread Theo Hultberg
wrote: > On Mon, Feb 24, 2014 at 7:52 PM, Theo Hultberg wrote: > > (I posted this on the client-dev list the other day, but that list seems > > dead so I'm cross posting, sorry if it's the wrong thing to do) > > I didn't even realize there was a list for driver imp

How should clients handle the user defined types in 2.1?

2014-02-24 Thread Theo Hultberg
(I posted this on the client-dev list the other day, but that list seems dead so I'm cross posting, sorry if it's the wrong thing to do) Hi, Is there any documentation on how CQL clients should handle the new user defined types coming in 2.1? There's nothing in the protocol specification on how t

Re: CQL decimal encoding

2014-02-24 Thread Theo Hultberg
I don't know if it's by design or if it's by oversight that the data types aren't part of the binary protocol specification. I had to reverse engineer how to encode and decode all of them for the Ruby driver. There were definitely a few bugs in the first few versions that could have been avoided if

Re: Extract meta-data using cql 3

2013-07-12 Thread Theo Hultberg
there's a keyspace called system which has a few tables that contain the metadata. for example schema_keyspaces that contain keyspace metadata, and schema_columnfamilies that contain table metadata. there are more, just fire up cqlsh and do a describe keyspace in the system keyspace to find them.

Re: manually removing sstable

2013-07-12 Thread Theo Hultberg
on Morton > Cassandra Consultant > New Zealand > > @aaronmorton > http://www.thelastpickle.com > > On 11/07/2013, at 10:17 PM, Theo Hultberg wrote: > > a colleague of mine came up with an alternative solution that also seems > to work, and I'd just like your opinion

Re: manually removing sstable

2013-07-11 Thread Theo Hultberg
\%P\n" | xargs -t --no-run-if-empty java -jar /usr/local/share/java/cmdline-jmxclient-0.10.3.jar - localhost:7199 org.apache.cassandra.db:type=CompactionManager just change the keyspace name and the path to the data directory. T# On Thu, Jul 11, 2013 at 7:09 AM, Theo Hultberg wrote: >

Re: manually removing sstable

2013-07-10 Thread Theo Hultberg
here is this: > https://issues.apache.org/jira/browse/CASSANDRA-5228 > > /Marcus > > > On Wed, Jul 10, 2013 at 2:09 PM, Theo Hultberg wrote: > >> Hi, >> >> I think I remember reading that if you have sstables that you know >> contain only data that whose

manually removing sstable

2013-07-10 Thread Theo Hultberg
Hi, I think I remember reading that if you have sstables that you know contain only data that whose ttl has expired, it's safe to remove them manually by stopping c*, removing the *-Data.db files and then starting up c* again. is this correct? we have a cluster where everything is written with a

Re: does anyone store large values in cassandra e.g. 100kb?

2013-07-09 Thread Theo Hultberg
:43 PM, S Ahmed wrote: > So was the point of breaking into 36 parts to bring each row to the 64 or > 128mb threshold? > > > On Tue, Jul 9, 2013 at 3:18 AM, Theo Hultberg wrote: > >> We store objects that are a couple of tens of K, sometimes 100K, and we >> store quite

Re: does anyone store large values in cassandra e.g. 100kb?

2013-07-09 Thread Theo Hultberg
We store objects that are a couple of tens of K, sometimes 100K, and we store quite a few of these per row, sometimes hundreds of thousands. One problem we encountered early was that these rows would become so big that C* couldn't compact the rows in-memory and had to revert to slow two-pass compa

Re: What is best Cassandra client?

2013-07-04 Thread Theo Hultberg
Datastax Java driver: https://github.com/datastax/java-driver T# On Thu, Jul 4, 2013 at 10:25 AM, Tony Anecito wrote: > Hi All, > What is the best client to use? I want to use CQL 3.0.3 and have support > for preparedStatmements. I tried JDBC and the thrift client so far. > > Thanks! >

Re: Performance issues with CQL3 collections?

2013-06-27 Thread Theo Hultberg
- > Aaron Morton > Freelance Cassandra Consultant > New Zealand > > @aaronmorton > http://www.thelastpickle.com > > On 27/06/2013, at 5:58 AM, Theo Hultberg wrote: > > do I understand it correctly if I think that collection modifications are > done by reading t

Re: Performance issues with CQL3 collections?

2013-06-26 Thread Theo Hultberg
ations should be interchangeable, because they share > the same serializers and deserializers) > > Also, please note that this patch has not been reviewed nor intensively > tested... So, it may not be "production ready" > > Fabien > > > > > > &g

Performance issues with CQL3 collections?

2013-06-26 Thread Theo Hultberg
Hi, I've seen a couple of people on Stack Overflow having problems with performance when they have maps that they continuously update, and in hindsight I think I might have run into the same problem myself (but I didn't suspect it as the reason and designed differently and by accident didn't use m

cql-rb, the CQL3 driver for Ruby has reached v1.0

2013-06-13 Thread Theo Hultberg
After a few months of development and many preview releases cql-rb, the pure Ruby CQL3 driver has finally reached v1.0. You can find the code and examples on GitHub: https://github.com/iconara/cql-rb T#

Re: Why so many vnodes?

2013-06-11 Thread Theo Hultberg
bution > of data. The larger T is, the closer to uniform the distribution will be, > with increasing probability." > > Alain > > > 2013/6/11 Theo Hultberg > >> thanks, that makes sense, but I assume in your last sentence you mean >> decrease it for large clus

Re: Why so many vnodes?

2013-06-10 Thread Theo Hultberg
s seconds to > complete.) > > So 256 was chosen to be a reasonable balance. I don't think most users > will find it too slow; users with extremely large clusters may need to > increase it. > > Richard. > > > On 10 June 2013 18:55, Theo Hultberg wrote: > >>

Re: Why so many vnodes?

2013-06-10 Thread Theo Hultberg
t mistaken, and that is the source of my confusion. T# On Mon, Jun 10, 2013 at 4:54 PM, Milind Parikh wrote: > There are n vnodes regardless of the size of the physical cluster. > Regards > Milind > On Jun 10, 2013 7:48 AM, "Theo Hultberg" wrote: > >> Hi, >&

Why so many vnodes?

2013-06-10 Thread Theo Hultberg
Hi, The default number of vnodes is 256, is there any significance in this number? Since Cassandra's vnodes don't work like for example Riak's, where there is a fixed number of vnodes distributed evenly over the nodes, why so many? Even with a moderately sized cluster you get thousands of slices.

Re: [Cassandra] Conflict resolution in Cassandra

2013-06-07 Thread Theo Hultberg
Like Edward says Cassandra's conflict resolution strategy is LWW (last write wins). This may seem simplistic, but Cassandra's Big Query-esque data model makes it less of an issue than in a pure key/value-store like Riak, for example. When all you have is an opaque value for a key you want to be abl

Re: Getting error "Too many in flight hints"

2013-05-30 Thread Theo Hultberg
30, 2013 at 8:24 AM, Theo Hultberg wrote: > > I'm using Cassandra 1.2.4 on EC2 (3 x m1.large, this is a test cluster), > and > > my application is talking to it over the binary protocol (I'm using JRuby > > and the cql-rb driver). I get this error quite frequently: &qu

Getting error "Too many in flight hints"

2013-05-30 Thread Theo Hultberg
Hi, I'm using Cassandra 1.2.4 on EC2 (3 x m1.large, this is a test cluster), and my application is talking to it over the binary protocol (I'm using JRuby and the cql-rb driver). I get this error quite frequently: "Too many in flight hints: 2411" (the exact number varies) Has anyone any idea of w

Re: Limit on the size of a list

2013-05-12 Thread Theo Hultberg
In the CQL3 protocol the sizes of collections are unsigned shorts, so the maximum number of elements in a LIST<...> is 65,536. There's no check, afaik, that stops you from creating lists that are bigger than that, but the protocol doesn't handle returning them (you get the first N - 65536 % 65536 i

New CQL3 driver for Ruby

2013-02-24 Thread Theo Hultberg
Hi, For the last few weeks I've been working on a CQL3 driver for Ruby. If you're using Ruby and Cassandra I would very much like your help getting it production ready. You can find the code and documentation here: https://github.com/iconara/cql-rb The driver supports the full CQL3 protocol exc

Re: cql: show tables in a keystone

2013-01-28 Thread Theo Hultberg
the DESCRIBE family of commands in cqlsh are wrappers around queries to the system keyspace, so if you want to inspect what keyspaces and tables exist from your application you can do something like: SELECT columnfamily_name, comment FROM system.schema_columnfamilies WHERE keyspace_name = 'test';

Re: CQL3 Frame Length

2013-01-19 Thread Theo Hultberg
Hi, Another reason for keeping the frame length in the header is that newer versions can add fields to frames without older clients breaking. For example a minor release can add some more content to an existing frame without older clients breaking. If clients didn't know the full frame length (and