On Mon, Oct 6, 2014 at 5:18 PM, Tilmann Rabl <tilmann.r...@utoronto.ca> wrote:
> I have a question related to Cassandra views. With a student, I have > implemented a materialized views for Cassandra in version 2.0. The student > left and I am trying to upgrade his code to the current version. I have > noticed that the way keys are internally built has changed a bit. > > Our old version has used CFMetaData.comparator.getString(Colum.name) to > get the name of a column (and the value) and that was then used to specify > column names in the view. We used CFMetaData.comparator.fromString to > generate the ByteBuffer representation. > It seems the new Composite representation should be able to do that in a > more efficient way (e.g., combine column names and keys), but I could not > figure out how to do it. That is a good question. This was introduced in CASSANDRA-5147, and there's a number of examples in the tests where we converted from the old getString approach (e.g. Util.cellname methods) but in general I'm a little fuzzy on how this works. Sylvain, do we have a writeup on this anywhere? -- Jonathan Ellis Project Chair, Apache Cassandra co-founder, http://www.datastax.com @spyced