Server-side CQL parameters substitution

2011-06-28 Thread Michal Augustýn
Hi all, in most SQL implementations, it's possible to declare parameters in SQL command text (i.e. "SELECT * FROM T WHERE Id=@myId"). Then the client application sends this SQL command and parameters values separately - the server is responsible for the parameters substitution. In CQL API (~the "

replacement for KsDef.replication_factor (deprecated in 0.8 API)

2011-06-27 Thread Michal Augustýn
Hi all, I just look into "Cassandra.thrift" file from 0.8 distribution and replication_factor element of KsDef structure is marked as @deprecated. What is the non-deprecated replacement for this (IMHO) core setting? Or is CQL the replacement? Thanks! Augi

Re: get_indexed_slices ~ simple map-reduce

2011-06-14 Thread Michal Augustýn
mory. > > > So, yes it reads just the columns from disk you you ask for. Unless it thinks > it will take no more work to read more. > > Hope that helps. > > - > Aaron Morton > Freelance Cassandra Developer > @aaronmorton > http://www.thelastpick

Re: get_indexed_slices ~ simple map-reduce

2011-06-12 Thread Michal Augustýn
econdary indexes. > Cheers > > - > Aaron Morton > Freelance Cassandra Developer > @aaronmorton > http://www.thelastpickle.com > On 11 Jun 2011, at 19:23, Michal Augustýn wrote: > > Hi all, > > I'm thinking of get_indexed_slices function as a simpl

get_indexed_slices ~ simple map-reduce

2011-06-11 Thread Michal Augustýn
Hi all, I'm thinking of get_indexed_slices function as a simple map-reduce job (that just maps) - am I right? Well, I would like to be able to run simple queries on values but I don't want to install Hadoop, write map-reduce jobs in Java (the whole application is in C# and I don't want to introdu

CQL - raw bytes values

2011-06-03 Thread Michal Augustýn
Hello, I have read a lot about CQL and I looked into source and it seems that just string, long and uuid can be used as column name/value in CQL commands. Is there any way how to works with "pure" bytes? I.e. "SELECT BYTES(3412) FROM MyColumnFamily". Actually, I wouldn't use CQL without this featu

Re: how to know there are some columns in a row

2011-06-02 Thread Michal Augustýn
Hi, just use "get" Thrift method where "super_column" and "column" attributes in ColumnPath structure are empty. Yes, it returns both column names and values but I'm afraid there is no Thrift-way how to get column names only. Augi 2011/6/2 Yonder : > Dear all, > > Is there any methods to list co

Re: Understanding Indexes

2011-02-24 Thread Michal Augustýn
Retrieving data using row key is the primary way how to get data from Cassandra, so it's highly optimized. Firstly, node responsible for the row is computed using partitioner. You can use RandomPartitioner (distributes md5 of keys) or OrderPreservingPartitioner (key must be UTF8 string). Then the r

Re: Are row-keys sorted by the compareWith?

2011-02-18 Thread Michal Augustýn
Hi, I see "The CompareWith attribute tells Cassandra how to sort the columns for slicing operations." on wiki ( http://wiki.apache.org/cassandra/StorageConfiguration). So the CompareWith defines how to sort column (or super-columns) in scope of one row. So this option is relate to (multi)get_slice

Re: cant seem to figure out secondary index definition

2011-02-15 Thread Michal Augustýn
ector embeddedServerHelper, which > takes definitions from the yaml. > > So i’d still like to define the index in the yaml file (it should very well > be possible I guess) > > > > > > *Von:* Michal Augustýn [mailto:augustyn.mic...@gmail.com] > *Gesendet:* Diensta

Re: cant seem to figure out secondary index definition

2011-02-15 Thread Michal Augustýn
Hi, if you download Cassandra and look into "conf/cassandra.yaml" then you can see this: "this keyspace definition is for demonstration purposes only. Cassandra will not load these definitions during startup. See http://wiki.apache.org/cassandra/FAQ#no_keyspaces for an explanation." So you shoul

How to rename column family?

2011-02-15 Thread Michal Augustýn
Hello, I would like to rename some column families but I discovered that the system_rename_column_family disappeared in 0.7. How to rename the column family now? I tried system_update_column_family method but it doesn't work for renaming :( Thank you!

Re: online chat scenario

2011-02-15 Thread Michal Augustýn
The schema design depends on chatrooms/users/messages numbers. I.e. you can have one CF, where key is chatroom, column name is username, column value is the message and message time is the same as column timestamp. You can add day-timestamp to the chatroom name to avoid large rows. Augi 2011/2/15

Re: Backend application for Cassandra

2011-02-14 Thread Michal Augustýn
Hi, it depends on your queries complexity - maybe secondary indexes would be sufficient for you - http://www.datastax.com/dev/blog/whats-new-cassandra-07-secondary-indexes If your queries are too complex then you could use Pig (over Hadoop) - http://www.slideshare.net/jeromatron/cassandrahadoop-i

Re: per-connection "read-after-my-write" consistency

2011-02-12 Thread Michal Augustýn
> and continue to operate). If you require strong consistency you will either > have to read or write at consistency level ALL. My suggestion is to either > design your application to tolerate inconsistency (if possible) or move to > RF=3 and quorum read and quorum writes. >

per-connection "read-after-my-write" consistency

2011-02-12 Thread Michal Augustýn
Hi, I'm running 2 nodes with RF=2 (not optimal, I know), Cassandra 0.7.1. During one connection, I write (CL.ONE) a row and subsequently read (CL.ONE) the same row (via Thrift). I supposed that if I write row to one node then I can immediately read this row from this node. It seems to be true for

remove column from all super-columns failed

2010-12-15 Thread Michal Augustýn
Helllo, I want to remove one column from all super columns in one row (for one key) (via Thrift, Cassandra 0.7) but I got exception (see below). I just call "remove" method where ColumnPath structure has "column_family" and "column" members set ("super_column" not set). ERROR 17:57:46,924 Error i

Re: Column TTL

2010-10-06 Thread Michal Augustýn
Hi, I checked Cassandra.thrift file and found: @param ttl. An optional, positive delay (in seconds) after which the column will be automatically deleted. Augi 2010/10/6 Dan Hendry > Hi, > > > > I have a quick and quite frankly ridiculous question regarding the column > TTL value; what are t

Re: "Internal error processing get" in get after insert ttl

2010-09-23 Thread Michal Augustýn
k that is > does fix the problem ? > > -- > Sylvain > > On Thu, Sep 23, 2010 at 1:28 PM, Michal Augustýn > wrote: > > Ah, I didn't know that, thank you! > > Here is the trace: > > ERROR 13:25:59,418 Internal error processing get > > java.lan

Re: "Internal error processing get" in get after insert ttl

2010-09-23 Thread Michal Augustýn
le named log4j.properties on the > classpath. > > On Thu, Sep 23, 2010 at 5:52 AM, Michal Augustýn > wrote: > > Unfortunately, I'm running Cassandra on Windows platform and the logging > > doesn't work; I'm not able to configure them properly respectively. >

Re: "Internal error processing get" in get after insert ttl

2010-09-23 Thread Michal Augustýn
d you check the cassandra logs and give us the stack trace of the error > ? > > -- > Sylvain > > On Thu, Sep 23, 2010 at 8:36 AM, Michal Augustýn > wrote: > > Hello, > > I tried to use Column.Ttl property but I was not successful. My simple > test: > > 1)

Re: "Internal error processing get" in get after insert ttl -

2010-09-23 Thread Michal Augustýn
Blog <http://vinetedaniel.blogspot.com> | >> Linkedin<http://in.linkedin.com/in/vineetdaniel> >> | Twitter <https://twitter.com/vineetdaniel> >> >> >> >> >> >> On Thu, Sep 23, 2010 at 12:48 PM, Sylvain Lebresne wrote: >> >

"Internal error processing get" in get after insert ttl

2010-09-22 Thread Michal Augustýn
Hello, I tried to use Column.Ttl property but I was not successful. My simple test: 1) insert column with ttl = 3 2) get column - all is ok 3) wait for 2 seconds 4) get column - all is ok 5) wait again for 2 seconds (so column should disappear) 6) get column - I got "Thrift.TApplicationException"

Re: Connection issue with trunk using .net

2010-09-20 Thread Michal Augustýn
>> That... is this thread. I'm glad the solution works for you Morten. >> >> >> On Mon, Sep 20, 2010 at 12:33 PM, Michal Augustýn < >> augustyn.mic...@gmail.com> wrote: >> >>> Check this thread too: >>> http://www.mail-archive.co

Re: "timestamp" parameter for Thrift "insert" API ??

2010-09-20 Thread Michal Augustýn
Consider situation when you have more Cassandra servers. It would require time synchronization in Cassandra itself. So we have to have time synchronization - on applications servers or Cassandra servers. I'm not sure if this is concern of Cassandra but it would be good for me... 2010/9/20 Kuan(謝冠生

Re: Connection issue with trunk using .net

2010-09-20 Thread Michal Augustýn
Check this thread too: http://www.mail-archive.com/user@cassandra.apache.org/msg06024.html Augi 2010/9/20 Morten Wegelbye Nissen > On 19-09-2010 23:50, Michael Greene wrote: > >> Trunk (and 0.7) use Thrift's framed transport,

Re: Network latency on Cassandra 0.7 (TFramedTransport)

2010-09-18 Thread Michal Augustýn
Thank you very much. This solves my issue. Augi 2010/9/17 Michael Greene > This is the correct cause. Reproducing your test gives 38-45ms in each of > 10 runs. If you run a profiler against it, you can see that the time is > entirely spent blocking on receive in TStreamTransport.Read. > > You

Network latency on Cassandra 0.7 (TFramedTransport)

2010-09-17 Thread Michal Augustýn
Hello, I'm experiencing big network latency when using TFramedTransport. The latency is about 200 ms on every request when I'm connected to another computer. On localhost, all goes well. I can now solve this issue by changing "thrift_framed_transport_size_in_mb" to 0 (so disable framed transport

Re: OrderPreservingPartitioner for get_range_slices

2010-09-15 Thread Michal Augustýn
And what about uniqueness? Can we be sure that we get each row just once? Thanks. 2010/9/15 Janne Jalkanen > > Correct. You can use get_range_slices with RandomPartitioner too, BUT the > iteration order is non-predictable, that is, you will not know in which > order you get the rows (RandomPart

Re: How to implement (generic) ACID on application level

2010-09-07 Thread Michal Augustýn
Never mind - I didn't want to send the last paragraph. I'm sorry. 2010/9/7 Jonathan Shook > ... some kind of what? > > On Mon, Sep 6, 2010 at 3:38 AM, Michal Augustýn > wrote: > > Thank you for the great link! > > The mentioned solution is using locking bu

Re: skip + limit support in GetSlice

2010-09-06 Thread Michal Augustýn
ut it should be faster > because > much less data is transferred (and the latency can be hidden by > concurrency). > > Martin > > -- > *From:* Michal Augustýn [mailto:augustyn.mic...@gmail.com] > *Sent:* Monday, September 06, 2010 10:26 AM > &

Re: How to implement (generic) ACID on application level

2010-09-06 Thread Michal Augustýn
> I read an article about using CAGES with Cassandra to achieve locking > and transaction... > > Here is the link : > > > http://ria101.wordpress.com/2010/05/12/locking-and-transactions-over-cassandra-using-cages/ > > On 9/5/10, Michal Augustýn wrote: > > Hell

Re: skip + limit support in GetSlice

2010-09-06 Thread Michal Augustýn
number of records you want to show per page in the 'count'. > * Avoid letting user skip to page X, using Next/Prev/First/Last only (same > way GMail does it) > > > > Michal Augustýn wrote: > > I know that "Prev/Next" is good solution for web applications. B

Re: skip + limit support in GetSlice

2010-09-05 Thread Michal Augustýn
icent. > > -Original Message- > From: "Michal Augustýn" > Sent: Sunday, September 5, 2010 5:39am > To: user@cassandra.apache.org > Subject: skip + limit support in GetSlice > > Hello, > > probably this is feature request. Simply, I would like to have su

How to implement (generic) ACID on application level

2010-09-05 Thread Michal Augustýn
Hello, we can read everywhere that Cassandra (and similar NoSQL solutions) doesn't support full ACID and (when we want to have ACID) we have to implement ACID in higher layers of our application. Are there some good resources on how to implement ACID on higher layers? I.e. how to implement reposit

skip + limit support in GetSlice

2010-09-05 Thread Michal Augustýn
Hello, probably this is feature request. Simply, I would like to have support for standard pagination (skip + limit) in GetSlice Thrift method. Is this feature on the road map? Now, I have to perform GetSlice call, that starts on "" and "limit" is set to "skip" value. Then I read the last column