Why is Quorum not sufficient for Linearization?

2014-10-15 Thread Timmy Turner
Cassandra in general can't provide guarantee any ordering of the executed
queries, since nodes may fail or rejoin the in arbitrary points in time.

But why can't it provide ordering for queries run at at least the quorum
level? Given that none of the updates get lost, why would order still an
issue?

Can you maybe illustrate a scenario which shows how/where the order would
get lost if writes and reads always occurred with quorum consistency?


Semantics of Triggers ( their future)

2014-10-12 Thread Timmy Turner
Information on triggers seems a bit scarce so far. The blog entry on
http://www.datastax.com/dev/blog/whats-new-in-cassandra-2-0-prototype-triggers-support
mentions them as being usable for maintaining materialized views, since
they'll be handled similarly to logged/atomic batches - is that enough to
ensure that values in materialized views remain accurate?

Or does atomic in this context really mean atomic, isolated and
linearized per node - much like updates of indexed columns are handled too?
(indexed here being secondary indices.)

Also, the document mentions triggers being partition-level. Does this
mean trigger code (or rather the generated mutations of a trigger) cannot
manipulate more than one partition (and thus also cannot manipulate more
than one columnfamily)? How can materialized views be maintained without
being able to write to 2 columnfamilies (the cf with the actual values, and
the cf with the pre-aggregated ones)?

Finally, one more question about the future of triggers: Since it is
planned for 3.0 to have user defined functions (UDFs) in some PL/SQL-like
language, will it (eventually) be possible to write triggers in this
language too? Or will triggers always have to be directly loaded into the
JVM processes of the Cassandra instances?
It would be great if there was some way to be able to load trigger code
from the client-side without having to manipulate the code and/or libraries
on the server-side for scenarios where Cassandra is being used as a hosted
service (PaaS).

I realize that triggers are still experimental, but this looks like an
exciting new feature.


Not-Equals (!=) in Where Clause

2014-09-29 Thread Timmy Turner
Looking through the CQL 3.1 grammar for Cassandra 2.1, I noticed that the
not-equals operator (!=) is in the grammar definition, but I can't seem to
find any legal way to use it.

Is != supported as part of the where clause in Cassandra? Or is it the
grammar for some other purpose?


Named Parameters in Prepared Statement

2014-09-22 Thread Timmy Turner
Looking through the CQL 3.1 grammar in Cassandra, I found a ':' ident
alternative in the value rule (line 961).

Is this for binding named parameters in prepared statements? Is this
currently supported by any of the drivers or in Cassandra (2.1) itself?

Looking at the docs and the current Java driver it doesn't seem that way.


Cassandra Java Client

2014-02-26 Thread Timmy Turner
Hi,

is the DataStax Java Driver for Apache Cassandra (
https://github.com/datastax/java-driver) the official/recommended Java
Client to use for accessing Cassandra from Java?

Does Cassandra itself (i.e. the apache-cassandra-* jars) not contain any
CQL clients?


Thanks!


Cassandra Version History

2014-02-24 Thread Timmy Turner
Hi,

is there a history/list showing which major (as in x.y) versions of
Cassandra were released on which date?

Or is the list on Wikipedia complete? Did 2.0 come after 1.2?

Thanks!


Cassandra 2.0.5 Configuration

2014-02-24 Thread Timmy Turner
Hi,

when building and running Cassandra 2.0.5 from the git repository, the log
is full of lines like these

00:01:42.286 [CompactionExecutor:1] DEBUG
o.a.c.d.compaction.CompactionManager - Checking system.local

When building and running 2.1.0/trunk the log settings are however fine. Is
there any way I can lower the log setting in 2.0.5?

I already tried setting

log4j.rootLogger=ERROR,stdout,R

it in conf/log4j-server.properties, but that did not seem to have any
effect.


Thanks!


Re: Looking for a good Ruby client

2012-11-20 Thread Timmy Turner
@Mat Brown:

 (while still retaining compatibility with CQL2 structures).

Do you mean by exceeding what Cassandra itself provides in terms of CQL2/3
interoperability?

I'm looking into something similar currently (however in Java not in Ruby)
and would be interested in your experiences, if you follow through with the
plan. Do you have a blog?


Thanks!


2012/11/20 Alain RODRIGUEZ arodr...@gmail.com

 @Mat

 Well I guess you could add your Ruby client to this list since there is
 not a lot of them yet.

 http://wiki.apache.org/cassandra/ClientOptions

 Alain


 2012/11/20 Mat Brown m...@brewster.com

 As the author of Cequel, I can assure you it is excellent ; )

 We use it in production at Brewster and it is quite stable. If you try
 it out and find any bugs, we'll fix 'em  quickly.

 I'm planning a big overhaul of the model layer over the holidays to
 expose all the
 new data modeling goodness in CQL3 (while still retaining
 compatibility with CQL2 structures).

 On Thu, Nov 15, 2012 at 3:42 PM, Harry Wilkinson hwilkin...@mdsol.com
 wrote:
  Update on this: someone just pointed me towards the Cequel gem:
  https://github.com/brewster/cequel
 
  The way it's described in the readme it looks like exactly what I was
  looking for - a modern, CQL-based gem that is in active development and
 also
  follows the ActiveModel pattern.  I'd be very interested to hear if
 anybody
  has used this, whether it's stable/reliable, etc.
 
  Thanks.
 
  Harry
 
  On 2 August 2012 00:31, Thorsten von Eicken t...@rightscale.com wrote:
 
  Harry, we're in a similar situation and are starting to work out our
 own
  ruby client. The biggest issue is that it doesn't make much sense to
 build a
  higher level abstraction on anything other than CQL3, given where
 things are
  headed. At least this is our opinion.
  At the same time, CQL3 is just barely becoming usable and still seems
  rather deficient in wide-row usage. The tricky part is that with the
 current
  CQL3 you have to construct quite complex iterators to retrieve a large
  result set. Which means that you end up having to either parse CQL3
 coming
  in to insert the iteration stuff, or you have to pass CQL3 fragments
 in and
  compose them together with iterator clauses. Not fun stuff either way.
  The only good solution I see is to switch to a streaming protocol (or
  build some form of continue on top of thrift) such that the client
 can ask
  for a huge result set and the cassandra coordinator can break it into
  sub-queries as it sees fit and return results chunk-by-chunk. If this
 is
  really the path forward then all abstractions built above CQL3 before
 that
  will either have a good piece of complex code that can be deleted or
 worse,
  will have an interface that is no longer best practice.
  Good luck!
  Thorsten
 
 
 
  On 8/1/2012 1:47 PM, Harry Wilkinson wrote:
 
  Hi,
 
  I'm looking for a Ruby client for Cassandra that is pretty high-level.
  I
  am really hoping to find a Ruby gem of high quality that allows a
 developer
  to create models like you would with ActiveModel.
 
  So far I have figured out that the canonical Ruby client for Cassandra
 is
  Twitter's Cassandra gem of the same name.  It looks great - mature,
 still in
  active development, etc.  No stated support for Ruby 1.9.3 that I can
 see,
  but I can probably live with that for now.
 
  What I'm looking for is a higher-level gem built on that gem that works
  like ActiveModel in that you just include a module in your model class
 and
  that gives you methods to declare your model's serialized attributes
 and
  also the usual ActiveModel methods like 'save!', 'valid?', 'find', etc.
 
  I've been trying out some different NoSQL databases recently, and for
  example there is an official Ruby client for Riak with a domain model
 that
  is close to Riak's, but then there's also a gem called 'Ripple' that
 uses a
  domain model that is closer to what most Ruby developers are used to.
  So it
  looks like Twitter's Cassandra gem is the one that stays close to the
 domain
  model of Cassandra, and what I'm looking for is a gem that's a
 Cassandra
  equivalent of RIpple.
 
  From some searching I found cassandra_object, which has been inactive
 for
  a couple of years, but there's a fork that looks like it's being
 maintained,
  but I have not found any kind of information to suggest the maintained
 fork
  is in general use yet.  I have found quite a lot of gems of a similar
 style
  that people have started and then not really got very far with.
 
  So, does anybody know of a suitable gem?  Would you recommend it?  Or
  perhaps you would recommend not using such a gem and sticking with the
  lower-level client gem?
 
  Thanks in advance for your advice.
 
  Harry
 
 
 





Re: Looking for a good Ruby client

2012-11-20 Thread Timmy Turner
Thanks Mat!

I thought you were going to expose the internals of CQL3 features like
(wide rows with) complex keys and collections to CQL2 clients (which is
something that should generally be possible, if Datastax' blog posts are
accurate, i.e. an actual description of how things were implemented and not
just a conceptual one).

I'm still negotiating with my project lead on what features will ultimately
be implemented, so I'm not sure whether CQL2/3 interoperability will
actually make it into the final 'product' .. but it isn't very high up on
the priority list, so it will most likely be implemented towards the end,
and thus I guess it'll also kind of depend on how much CQL2 support will be
provided by Cassandra itself when the time comes.


2012/11/20 Mat Brown m...@brewster.com

 Hi Timmy,

 I haven't done a lot of playing with CQL3 yet, mostly just reading the
 blog posts, so the following is subject to change : )

 Right now, the Cequel model layer has a skinny row model (which is
 designed to follow common patterns of Ruby ORMs) and a wide row model
 (which is designed to behave more or less like a Hash, the equivalent
 of Java's HashMap). The two don't integrate with each other in any
 meaningful way, but as far as I understand it, they do pretty much
 cover the data modeling possibilities in CQL2.

 The big idea I've got for the overhaul of Cequel for CQL3 is to allow
 building a rich, nested data model by integrating different flavors of
 CQL3 table, most notably multi-column primary keys, as well as
 collections. The core data types I have in mind are:

 1) Skinny row with simple primary key (e.g. blogs, with blog_id key)
 2) Skinny row with complex primary key (e.g. blog_posts, with
 (blog_id, post_id) key)
 3) Wide row with simple primary key (e.g. blog_languages -- kind of a
 weak example but i can't think of anything better for a blog : )
 4) Wide row with complex primary key (e.g. blog_post_tags)

 My goal is to make it easy to model one-one relationships via a shared
 primary key, and one-many via a shared prefix of the primary key. So,
 for instance, blogs and blog_languages rows would be one-one (both
 with a blog_id primary key) and blogs and blog_posts would be one-many
 (sharing the blog_id prefix in the primary key).

 From what I've read, it seems fairly clear that the actual CQL used to
 interact with #1 will be the same for CQL2 column families and CQL3
 tables, so no explicit backward compatibility would be needed. #2 and
 #4 are, of course, CQL3-only, so backward compatibility isn't an issue
 there either. What I'm not entirely clear on is #3 -- this is
 straightforward in CQL2, and presumably a CQL3 table with compact
 storage would behave in the same way. However, my understanding so far
 is that a non-compact CQL3 table would treat this structure
 differently, in that both the key and value of the map would
 correspond to columns in a CQL3 table. It may make more sense to just
 target compact storage tables with this data structure, but I'm going
 to need to play around with it more to figure that out. Otherwise,
 Cequel will need to provide two flavors of that structure.

 There's also some tension between CQL3 collections and just using
 traditional wide-row structures to achieve the same thing. For
 instance, blog_tags could also just be a tags collection in the blogs
 table. My plan at this point is to offer both options, since each has
 its advantages (collections don't require the creation of a separate
 table; but a separate table gives you access to slices of the
 collection).

 Anyway, that's probably a lot more of an answer than you needed, but
 hopefully the context helps. Definitely interested to hear about the
 direction you take your client in as well.

 Finally, regarding a blog, we've got one set up, but it's not live
 yet. I'll ping you with a link when it is; I'll certainly be posting
 on the development of the next Cequel release.

 Cheers,
 Mat

 On Tue, Nov 20, 2012 at 9:23 AM, Timmy Turner timm.t...@gmail.com wrote:
  @Mat Brown:
 
  (while still retaining compatibility with CQL2 structures).
 
  Do you mean by exceeding what Cassandra itself provides in terms of
 CQL2/3
  interoperability?
 
  I'm looking into something similar currently (however in Java not in
 Ruby)
  and would be interested in your experiences, if you follow through with
 the
  plan. Do you have a blog?
 
 
  Thanks!
 
 
  2012/11/20 Alain RODRIGUEZ arodr...@gmail.com
 
  @Mat
 
  Well I guess you could add your Ruby client to this list since there is
  not a lot of them yet.
 
  http://wiki.apache.org/cassandra/ClientOptions
 
  Alain
 
 
  2012/11/20 Mat Brown m...@brewster.com
 
  As the author of Cequel, I can assure you it is excellent ; )
 
  We use it in production at Brewster and it is quite stable. If you try
  it out and find any bugs, we'll fix 'em  quickly.
 
  I'm planning a big overhaul of the model layer over the holidays to
  expose all the
  new data modeling goodness

Re: Datatype Conversion in CQL-Client?

2012-11-19 Thread Timmy Turner
What I meant was the method that the Cassandra-jars give you when you
include them in your project:

  TTransport tr = new TFramedTransport(new TSocket(localhost, 9160));
  TProtocol proto = new TBinaryProtocol(tr);
  Cassandra.Client client = new Cassandra.Client(proto);
  tr.open();
  client.execute_cql_query(ByteBuffer.wrap(cql.getBytes()),
Compression.NONE);



2012/11/19 Brian O'Neill b...@alumni.brown.edu

 I don't think Michael and/or Jonathan have published the CQL java driver
 yet.  (CCing them)

 Hopefully they'll find a public home for it soon, I hope to include it in
 the Webinar in December.
 (http://www.datastax.com/resources/webinars/collegecredit)

 -brian

 ---

 Brian O'Neill

 Lead Architect, Software Development

 *Health Market Science*

 *The Science of Better Results*

 2700 Horizon Drive • King of Prussia, PA • 19406

 M: 215.588.6024 • @boneill42 http://www.twitter.com/boneill42  •

 healthmarketscience.com


 This information transmitted in this email message is for the intended
 recipient only and may contain confidential and/or privileged material. If
 you received this email in error and are not the intended recipient, or the
 person responsible to deliver it to the intended recipient, please contact
 the sender at the email above and delete this email and any attachments and
 destroy any copies thereof. Any review, retransmission, dissemination,
 copying or other use of, or taking any action in reliance upon, this
 information by persons or entities other than the intended recipient is
 strictly prohibited.

 ** **


 From: Tommi Laukkanen tlaukka...@gmail.com
 Reply-To: user@cassandra.apache.org
 Date: Monday, November 19, 2012 2:36 AM

 To: user@cassandra.apache.org
 Subject: Re: Datatype Conversion in CQL-Client?

 I think Timmy might be referring to the upcoming native CQL Java driver
 that might be coming with 1.2 - It was mentioned here:

 http://www.datastax.com/wp-content/uploads/2012/08/7_Datastax_Upcoming_Changes_in_Drivers.pdf

 I would also be interested on testing that but I can't find it from
 repositories. Any hints?

 Regards,
 Tommi L.

 *From:* Brian O'Neill [mailto:boneil...@gmail.com] *On Behalf Of *Brian
 O'Neill

 *Sent:* 18. marraskuuta 2012 17:47
 *To:* user@cassandra.apache.org
 *Subject:* Re: Datatype Conversion in CQL-Client?
 *Importance:* Low

 ** **

 ** **

 If you are talking about the CQL-client that comes with Cassandra
 (cqlsh), it is actually written in Python:

 https://github.com/apache/cassandra/blob/trunk/bin/cqlsh

 ** **

 For information on datatypes (and conversion) take a look at the CQL
 definition:

 http://www.datastax.com/docs/1.0/references/cql/index

 (Look at the CQL Data Types section)

 ** **

 If that's not the client you are referencing, let us know which one you
 mean:

 http://brianoneill.blogspot.com/2012/08/cassandra-apis-laundry-list.html*
 ***

 ** **

 -brian

 ** **

 On Nov 17, 2012, at 9:54 PM, Timmy Turner wrote:



 

 Thanks for the links, however I'm interested in the functionality that
 the official Cassandra client/API (which is in Java) offers.

 ** **

 2012/11/17 aaron morton aa...@thelastpickle.com

 Does the official/built-in Cassandra CQL client (in 1.2) 

 What language ? 

 ** **

 Check the Java
 http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/ and python
 http://code.google.com/a/apache-extras.org/p/cassandra-dbapi2/ drivers.**
 **

 ** **

 Cheers

 ** **

 ** **

 -

 Aaron Morton

 Freelance Cassandra Developer

 New Zealand

 ** **

 @aaronmorton

 http://www.thelastpickle.com

 ** **

 On 16/11/2012, at 11:21 AM, Timmy Turner timm.t...@gmail.com wrote:



 

 Does the official/built-in Cassandra CQL client (in 1.2) offer any
 built-in option to get direct values/objects when reading a field, instead
 of just a byte array? 

 ** **

 ** **

 ** **

 --
 Brian ONeill
 Lead Architect, Health Market Science (http://healthmarketscience.com)
 mobile:215.588.6024
 blog: http://weblogs.java.net/blog/boneill42/
 blog: http://brianoneill.blogspot.com/ 

 ** **





Re: Datatype Conversion in CQL-Client?

2012-11-19 Thread Timmy Turner
Do these other clients use the thrift API internaly?


2012/11/19 John Sanda john.sa...@gmail.com

 You might want to take  look a org.apache.cassandra.transport.SimpleClient
 and org.apache.cassandra.transport.messages.ResultMessage.


 On Mon, Nov 19, 2012 at 9:48 AM, Timmy Turner timm.t...@gmail.com wrote:

 What I meant was the method that the Cassandra-jars give you when you
 include them in your project:

   TTransport tr = new TFramedTransport(new TSocket(localhost, 9160));
   TProtocol proto = new TBinaryProtocol(tr);
   Cassandra.Client client = new Cassandra.Client(proto);
   tr.open();
   client.execute_cql_query(ByteBuffer.wrap(cql.getBytes()),
 Compression.NONE);



 2012/11/19 Brian O'Neill b...@alumni.brown.edu

 I don't think Michael and/or Jonathan have published the CQL java driver
 yet.  (CCing them)

 Hopefully they'll find a public home for it soon, I hope to include it
 in the Webinar in December.
 (http://www.datastax.com/resources/webinars/collegecredit)

 -brian

 ---

 Brian O'Neill

 Lead Architect, Software Development

 *Health Market Science*

 *The Science of Better Results*

 2700 Horizon Drive • King of Prussia, PA • 19406

 M: 215.588.6024 • @boneill42 http://www.twitter.com/boneill42  •

 healthmarketscience.com


 This information transmitted in this email message is for the intended
 recipient only and may contain confidential and/or privileged material. If
 you received this email in error and are not the intended recipient, or the
 person responsible to deliver it to the intended recipient, please contact
 the sender at the email above and delete this email and any attachments and
 destroy any copies thereof. Any review, retransmission, dissemination,
 copying or other use of, or taking any action in reliance upon, this
 information by persons or entities other than the intended recipient is
 strictly prohibited.

 ** **


 From: Tommi Laukkanen tlaukka...@gmail.com
 Reply-To: user@cassandra.apache.org
 Date: Monday, November 19, 2012 2:36 AM

 To: user@cassandra.apache.org
 Subject: Re: Datatype Conversion in CQL-Client?

 I think Timmy might be referring to the upcoming native CQL Java driver
 that might be coming with 1.2 - It was mentioned here:

 http://www.datastax.com/wp-content/uploads/2012/08/7_Datastax_Upcoming_Changes_in_Drivers.pdf

 I would also be interested on testing that but I can't find it from
 repositories. Any hints?

 Regards,
 Tommi L.

 *From:* Brian O'Neill [mailto:boneil...@gmail.com] *On Behalf Of *Brian
 O'Neill

 *Sent:* 18. marraskuuta 2012 17:47
 *To:* user@cassandra.apache.org
 *Subject:* Re: Datatype Conversion in CQL-Client?
 *Importance:* Low

 ** **

 ** **

 If you are talking about the CQL-client that comes with Cassandra
 (cqlsh), it is actually written in Python:

 https://github.com/apache/cassandra/blob/trunk/bin/cqlsh

 ** **

 For information on datatypes (and conversion) take a look at the CQL
 definition:

 http://www.datastax.com/docs/1.0/references/cql/index

 (Look at the CQL Data Types section)

 ** **

 If that's not the client you are referencing, let us know which one you
 mean:

 http://brianoneill.blogspot.com/2012/08/cassandra-apis-laundry-list.html
 

 ** **

 -brian

 ** **

 On Nov 17, 2012, at 9:54 PM, Timmy Turner wrote:



 

 Thanks for the links, however I'm interested in the functionality that
 the official Cassandra client/API (which is in Java) offers.

 ** **

 2012/11/17 aaron morton aa...@thelastpickle.com

 Does the official/built-in Cassandra CQL client (in 1.2) 

 What language ? 

 ** **

 Check the Java
 http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/ and
 python http://code.google.com/a/apache-extras.org/p/cassandra-dbapi2/
  drivers.

 ** **

 Cheers

 ** **

 ** **

 -

 Aaron Morton

 Freelance Cassandra Developer

 New Zealand

 ** **

 @aaronmorton

 http://www.thelastpickle.com

 ** **

 On 16/11/2012, at 11:21 AM, Timmy Turner timm.t...@gmail.com wrote:**
 **



 

 Does the official/built-in Cassandra CQL client (in 1.2) offer any
 built-in option to get direct values/objects when reading a field, instead
 of just a byte array? 

 ** **

 ** **

 ** **

 --
 Brian ONeill
 Lead Architect, Health Market Science (http://healthmarketscience.com)
 mobile:215.588.6024
 blog: http://weblogs.java.net/blog/boneill42/
 blog: http://brianoneill.blogspot.com/ 

 ** **






 --

 - John



Re: Datastax Java Driver

2012-11-19 Thread Timmy Turner
Why is this being released as a separate project, instead of being bundled
up with Cassandra? Is it not a part of Cassandra?


2012/11/19 John Sanda john.sa...@gmail.com

 Fantastic! As for the object mapping API, has there been any
 discussion/consideration of http://www.hibernate.org/subprojects/ogm.html?


 On Mon, Nov 19, 2012 at 1:50 PM, Sylvain Lebresne sylv...@datastax.comwrote:

 Everyone,

 We've just open-sourced a new Java driver we have been working on here at
 DataStax. This driver is CQL3 only and is built to use the new binary
 protocol
 that will be introduced with Cassandra 1.2. It will thus only work with
 Cassandra 1.2 onwards. Currently, it means that testing it requires
 1.2.0-beta2. This is also alpha software at this point. You are welcome
 to try
 and play with it and we would very much welcome feedback, but be sure that
 break, it will. The driver is accessible at:
   http://github.com/datastax/java-driver

 Today we're open-sourcing the core part of this driver. This main goal of
 this
 core module is to handle connections to the Cassandra cluster with all the
 features that one would expect. The currently supported features are:
   - Asynchronous: the driver uses the new CQL binary protocol asynchronous
 capabilities.
   - Nodes discovery.
   - Configurable load balancing/routing.
   - Transparent fail-over.
   - C* tracing handling.
   - Convenient schema access.
   - Configurable retry policy.

 This core module provides a simple low-level API (that works directly with
 query strings). We plan to release a higher-level, thin object mapping API
 based on top of this core shortly.

 Please refer to the project README for more information.

 --
 The DataStax Team




 --

 - John



Re: Datatype Conversion in CQL-Client?

2012-11-17 Thread Timmy Turner
Thanks for the links, however I'm interested in the functionality that the
official Cassandra client/API (which is in Java) offers.


2012/11/17 aaron morton aa...@thelastpickle.com

 Does the official/built-in Cassandra CQL client (in 1.2)

 What language ?

 Check the Java
 http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/ and python
 http://code.google.com/a/apache-extras.org/p/cassandra-dbapi2/ drivers.

 Cheers


 -
 Aaron Morton
 Freelance Cassandra Developer
 New Zealand

 @aaronmorton
 http://www.thelastpickle.com

 On 16/11/2012, at 11:21 AM, Timmy Turner timm.t...@gmail.com wrote:

 Does the official/built-in Cassandra CQL client (in 1.2) offer any
 built-in option to get direct values/objects when reading a field, instead
 of just a byte array?





Datatype Conversion in CQL-Client?

2012-11-15 Thread Timmy Turner
Does the official/built-in Cassandra CQL client (in 1.2) offer any built-in
option to get direct values/objects when reading a field, instead of just a
byte array?


Re: Admin for cassandra?

2012-11-15 Thread Timmy Turner
I think an eclipse plugin would be the wrong way to go here. Most people
probably just want to browse through the columnfamilies and see whether
their queries work out or not. This functionality is imho best implemented
as some form of a light-weight editor, not a full blown IDE.

I do have something of this kind scheduled as small part of a larger
project (seeing as how there is currently no properly working tool that
provides this functionality), but concrete results are probably still a few
months out..


2012/11/16 Edward Capriolo edlinuxg...@gmail.com

 We should build an eclipse plugin named Eclipsandra or something.

 On Thu, Nov 15, 2012 at 9:45 PM, Wz1975 wz1...@yahoo.com wrote:
  Cqlsh is probably the closest you will get. Or pay big bucks to hire
 someone
  to develop one for you:)
 
 
  Thanks.
  -Wei
 
  Sent from my Samsung smartphone on ATT
 
 
   Original message 
  Subject: Admin for cassandra?
  From: Kevin Burton rkevinbur...@charter.net
  To: user@cassandra.apache.org
  CC:
 
 
  Is there an IDE for a Cassandra database? Similar to the SQL Server
  Management Studio for SQL server. I mainly want to execute queries and
 see
  the results. Preferably that runs under a Windows OS.
 
 
 
  Thank you.
 
 



describe columnfamilies?

2012-11-14 Thread Timmy Turner
Using a describe columnfamilies/tables query, Cassandra only gives me
empty in 1.2.0-beta1 and the error mentioned in
https://issues.apache.org/jira/browse/CASSANDRA-4946 in 1.2.0-beta2,
despite there actually being columnfamilies in the currently selected/used
keyspace. Selecting/updating the columnfamilies and describe columnfamily
statements work fine.

Is this a bug that will eventually be fixed, or does describe
columnfamilies only list the columnfamilies after certain conditions (e.g.
only after they've been flushed to the disk) have been met? If so, what are
these conditions, and is there any way to force Cassandra to execute the
necessary steps to meet these conditions?


Re: CQL3: Unknown property 'comparator'?

2012-10-31 Thread Timmy Turner
 CQL 3 is not locked, the more feedback the better.

I'm pretty sure that my use case is not relevant enough to consider
special cases for it in Cassandra/CQL. In fact it's quite the other
way around - it's my job to determine how well my tool fits Cassandra
an other databases.

 Can you provide details on the use case?

Basically what I tried to do was some sort of transparent client-side
encryption, for those few that want to run their database in the
cloud, but are too paranoid to do so - i.e. hook the Cassandra (CQL)
library, parse the query myself (using a parser generated by
Cassandra's own grammar definition), extract the values the user said
he wanted encrypted (he did so in a configuration file), encrypt them,
replace the original values with the encrypted ones in the query
string, and hand it over to the actual CQL client library. If a result
set came back, then I decrypted it before ultimately handing it over
to the user.

I also had the option to encrypt column names with individual keys per
tuple, so they wouldn't result in the same ciphertext across tuples
(for those ultra-paranoid users). Other than severely limiting the
functionality of Cassandra (i.e. a user couldn't select specific
columns any more, if more than one tuple was to be queried from the
database; but queries for one specific tuple would still work without
any kind of limitation), this worked fine in CQL2. In CQL3 this,
obviously, isn't possible any more, if the users won't settle for
using composite keys instead of columns.

 AFAIK to be  schema free  you use the row-column-value model. While this
 looks like many rows it is a single store engine row.

I know. CQL3 is still a superset of CQL2's features, so in theory it
can still do everything CQL2 could - but the real question is how
Cassandra users will end up using it, and what kind of usage patterns
the current data model encourages.

2012/10/30 aaron morton aa...@thelastpickle.com:
 My use case relied on mangling the column names for various

 Can you provide details on the use case?
 CQL 3 is not locked, the more feedback the better.

 That's not a problem, but I still needed a definitive statement that
 schema-free tables (not column families obviously) are now
 impossible within CQL, that I can document in the project as the
 reason for the changes.

 AFAIK to be  schema free  you use the row-column-value model. While this
 looks like many rows it is a single store engine row.

 Cheers

 -
 Aaron Morton
 Freelance Developer
 @aaronmorton
 http://www.thelastpickle.com

 On 30/10/2012, at 8:45 PM, Timmy Turner timm.t...@gmail.com wrote:

 Is your use case covered in the article above ?


 My use case relied on mangling the column names for various
 purposes, and CQL3 with its transposed columns does of course still
 allow for that, but it means rewriting the part of the application
 that dealt with CQL so it can handle the new syntax/data model.

 That's not a problem, but I still needed a definitive statement that
 schema-free tables (not column families obviously) are now
 impossible within CQL, that I can document in the project as the
 reason for the changes.


 Thanks!

 2012/10/30 aaron morton aa...@thelastpickle.com:

 More background http://www.datastax.com/dev/blog/thrift-to-cql3

 So does this mean that in CQL 3 an explicit schema is absolutely
 mandatory?

 Not really, it sort of depends on your view.

 Lets say this is a schema free CF definition in CLI

  create column family clicks
with key_validation_class = UTF8Type
 and comparator = DateType
 and default_validation_class = UTF8Type

 It could be used for wide rows with lots of columns, where the name is a
 date.

 As the article at the top says, this CQL 3 DDL is equivalent:

CREATE TABLE clicks (
  key text,
  column1 timestamp,
  value text,
  PRIMARY KEY (key, column)
) WITH COMPACT STORAGE

 This creates a single row inside C*, column name is a date. The difference
 is CQL 3 pivots this one storage engine row into multiple CQL 3 rows. (See
 article)

 So far so good. Let's add some schema:

CREATE TABLE clicks (
  user_id text,
  click_time timestamp,
  click_url text,
  PRIMARY KEY (user_id, click_time)
) WITH COMPACT STORAGE

 That's functionally the same but has some more schema in it. It tells CQL 3
 that the label to use for the name of a column is click_time. Previously
 the label was column1.


 It's now impossible (within CQL) to add new
 (non-primary-key) columns only for individual rows implicitly with
 DML-queries (insert/update)?.

 Is your use case covered in the article above ?

 Cheers

 -
 Aaron Morton
 Freelance Developer
 @aaronmorton
 http://www.thelastpickle.com

 On 30/10/2012, at 2:31 AM, Timmy Turner timm.t...@gmail.com wrote:

 Thank you! That article helps clear up a lot of my confusion about the
 changes between CQL 2 and 3, since I was wondering how to
 access/manipulate

Re: Create CF with composite column through CQL 3

2012-10-31 Thread Timmy Turner
CQL3 handles columns/rows/keys differently than Cassandra itself
underneath. If you look closely you'll see that your real primary key
is in fact only a Long:

   Key Validation Class: org.apache.cassandra.db.marshal.LongType

If you want to know more about it, check these 2 articles:

http://www.datastax.com/dev/blog/cql3-for-cassandra-experts
http://www.datastax.com/dev/blog/thrift-to-cql3
(Also note that there are differences in CQL3 between 1.1 an 1.2.)

This caused a bit of confusion for myself too a few days ago. It
should really be documented somewhere in the wiki (as a CQL upgrade
guide or something), not just be mentioned in the Datastax blog.

2012/10/31 Wei Zhu wz1...@yahoo.com:
 I try to use CQL3 to create CF with composite columns,

  CREATE TABLE Friends (
  ... user_id bigint,
  ... friend_id bigint,
  ... status int,
  ... source int,
  ... created timestamp,
  ... lastupdated timestamp,
  ... PRIMARY KEY (user_id, friend_id, status, source)
  ... );


 When I check it with cli, the composite type is a bit odd, why it's defined
 as Long, Int32, Int32, UTF8, is it supposed to be Long, Long, Int32, Int32?
 Did
 I do something wrong?

  describe friends;
 ColumnFamily: friends
   Key Validation Class: org.apache.cassandra.db.marshal.LongType
   Default column value validator:
 org.apache.cassandra.db.marshal.UTF8Type
   Columns sorted by: org.apache.cassandra.db.marshal.CompositeType(
 org.apache.cassandra.db.marshal.LongType,
 org.apache.cassandra.db.marshal.Int32Type,
 org.apache.cassandra.db.marshal.Int32Type,
 org.apache.cassandra.db.marshal.UTF8Type)
   GC grace seconds: 864000
   Compaction min/max thresholds: 4/32
   Read repair chance: 0.1
   DC Local Read repair chance: 0.0
   Replicate on write: true
   Caching: KEYS_ONLY
   Bloom Filter FP chance: default
   Built indexes: []
   Compaction Strategy:
 org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
   Compression Options:
 sstable_compression:
 org.apache.cassandra.io.compress.SnappyCompressor

 Thanks.
 -Wei


Re: CQL3: Unknown property 'comparator'?

2012-10-30 Thread Timmy Turner
 Is your use case covered in the article above ?

My use case relied on mangling the column names for various
purposes, and CQL3 with its transposed columns does of course still
allow for that, but it means rewriting the part of the application
that dealt with CQL so it can handle the new syntax/data model.

That's not a problem, but I still needed a definitive statement that
schema-free tables (not column families obviously) are now
impossible within CQL, that I can document in the project as the
reason for the changes.


Thanks!

2012/10/30 aaron morton aa...@thelastpickle.com:
 More background http://www.datastax.com/dev/blog/thrift-to-cql3

 So does this mean that in CQL 3 an explicit schema is absolutely
 mandatory?

 Not really, it sort of depends on your view.

 Lets say this is a schema free CF definition in CLI

   create column family clicks
 with key_validation_class = UTF8Type
  and comparator = DateType
  and default_validation_class = UTF8Type

 It could be used for wide rows with lots of columns, where the name is a
 date.

 As the article at the top says, this CQL 3 DDL is equivalent:

 CREATE TABLE clicks (
   key text,
   column1 timestamp,
   value text,
   PRIMARY KEY (key, column)
 ) WITH COMPACT STORAGE

 This creates a single row inside C*, column name is a date. The difference
 is CQL 3 pivots this one storage engine row into multiple CQL 3 rows. (See
 article)

 So far so good. Let's add some schema:

 CREATE TABLE clicks (
   user_id text,
   click_time timestamp,
   click_url text,
   PRIMARY KEY (user_id, click_time)
 ) WITH COMPACT STORAGE

 That's functionally the same but has some more schema in it. It tells CQL 3
 that the label to use for the name of a column is click_time. Previously
 the label was column1.


 It's now impossible (within CQL) to add new
 (non-primary-key) columns only for individual rows implicitly with
 DML-queries (insert/update)?.

 Is your use case covered in the article above ?

 Cheers

 -
 Aaron Morton
 Freelance Developer
 @aaronmorton
 http://www.thelastpickle.com

 On 30/10/2012, at 2:31 AM, Timmy Turner timm.t...@gmail.com wrote:

 Thank you! That article helps clear up a lot of my confusion about the
 changes between CQL 2 and 3, since I was wondering how to
 access/manipulate CompositeType/DynamicCompositeType columns through
 CQL.

 So does this mean that in CQL 3 an explicit schema is absolutely
 mandatory? It's now impossible (within CQL) to add new
 (non-primary-key) columns only for individual rows implicitly with
 DML-queries (insert/update)?.




 2012/10/29 Sylvain Lebresne sylv...@datastax.com:

 CQL3 does absolutely allow dynamic column families, but does it
 differently from CQL2. See
 http://www.datastax.com/dev/blog/cql3-for-cassandra-experts.

 --
 Sylvain

 On Mon, Oct 29, 2012 at 12:34 PM, Timmy Turner timm.t...@gmail.com wrote:

 Does CQL3 not allow dynamic columns (column names) any more?




CQL3 Cell-Transposition - Client or Server Side?

2012-10-30 Thread Timmy Turner
Does the cell transposition that is necessary for CQL3 happen on the
server side after the query execution, or is it something that the
Cassandra/CQL-client does before ultimately handing over the result
set to the caller?


CQL3: Unknown property 'comparator'?

2012-10-29 Thread Timmy Turner
Does CQL3 not allow dynamic columns (column names) any more?


Re: CQL3: Unknown property 'comparator'?

2012-10-29 Thread Timmy Turner
Thank you! That article helps clear up a lot of my confusion about the
changes between CQL 2 and 3, since I was wondering how to
access/manipulate CompositeType/DynamicCompositeType columns through
CQL.

So does this mean that in CQL 3 an explicit schema is absolutely
mandatory? It's now impossible (within CQL) to add new
(non-primary-key) columns only for individual rows implicitly with
DML-queries (insert/update)?.




2012/10/29 Sylvain Lebresne sylv...@datastax.com:
 CQL3 does absolutely allow dynamic column families, but does it
 differently from CQL2. See
 http://www.datastax.com/dev/blog/cql3-for-cassandra-experts.

 --
 Sylvain

 On Mon, Oct 29, 2012 at 12:34 PM, Timmy Turner timm.t...@gmail.com wrote:
 Does CQL3 not allow dynamic columns (column names) any more?


Re: idea drive layout - 4 drives + RAID question

2012-10-29 Thread Timmy Turner
I'm not sure whether the raid 0 gets you anything other than headaches
should one of the drives fail. You can already distribute the
individual Cassandra column families on different drives by just
setting up symlinks to the individual folders.

2012/10/30 Ran User ranuse...@gmail.com:
 For a server with 4 drive slots only, I'm thinking:

 either:

 - OS (1 drive)
 - Commit Log (1 drive)
 - Data (2 drives, software raid 0)

 vs

 - OS  + Data (3 drives, software raid 0)
 - Commit Log (1 drive)

 or something else?

 also, if I can spare the wasted storage, would RAID 10 for cassandra data
 improve read performance and have no effect on write performance?

 Thank you!


Roadmap/Changelog?

2012-10-27 Thread Timmy Turner
Hi everyone,

I wrote a library/extension for Cassandra 0.8 a while back, and would
like to update it to the current version now, however I can't really
find any articles on what has changed in Cassandra. I read the
changelog, but those points are too detailed, and it's hard to
determine what impact they really have on the functionality.

The last things I remember are that CQL v3 was scheduled for 1.1 and
supercoloumns would be removed and replaced by compound columns (and
included in CQL). Has that already happened?

Also it would be interesting to know whether there is any kind of
roadmap for Cassandra for new features or functionality that may be
introduced in upcoming versions, or features that may be removed in
future versions.


Thanks!