On Tue, Sep 7, 2010 at 17:42, kannan chandrasekaran <ckanna...@yahoo.com> wrote:
> Hi All,
>
> We are currently considering Cassandra for our application.
>
> Platform:
> * a single-node cluster.
> * windows '08
> * 64-bit jvm
>
> For the sake of brevity let,
> Cassandra service =  a single node cassandra server running as an embedded
> service inside a JVM
>
>
> My use cases:
> 1) Start with a schema ( keyspace and set of column families under it) in a
> cassandra service
> 2) Need to be able to replicate the same schema structure (add new
> keyspace/columnfamilies with different names ofcourse).
> 3) Because of some existing limitations in my application, I need to be able
> to write to the keyspace/column-families from a cassandra service and read
> the written changes from a different cassandra service. Both the write and
> the read "cassandra-services" are sharing the same Data directory. I
> understand that the application has to take care of any naming collisions.
>
>
> Couple Questions related to the above mentioned usecases:
> 1) I want to spawn a new JVM and launch Cassandra as an embedded service
> programatically instead of using the startup.bat. I would like to know if
> that is possible and any pointers in that direction would be really helpful.
> ( use-case1)

There are a couple ways to do this.  I've used two of them (tanuki and
objectweb).  Tanuki is better imo.  I've never used it, but Apache
procrun is probably worth checking out.

> 2) I understand that there are provisions for live schema changes in 0.7 (
> thank you guys !!!), but since I cant use a beta version in production, I am
> restricted to 0.6 for now. Is it possible to to support use-case 2 in 0.6.5
> ? More specifically, I am planning to make runtime changes to the
> storage.conf xml file followed by a cassandra service restart

Yes, but this is a manual process and will not scale well.

> 3) Can I switch the data directory at run-time ?  (use-case 3). In order to
> not disrupt read while the writes are in progress, I am thinking something
> like, copy the existing data-dir into a new location; write to a new data
> directory; once the write is complete; switch pointers and restart the
> cassandra service to read from the new directory to pick up the updated
> changes
>

Pointing two cassandra instances at the same data directory?  This is
a bad idea.  I've never tried it, so I don't know exactly what will
happen, but I imagine you would corrupt your system tables pretty
quickly and your commit log wouldn't be too happy either.  This is a
completely unsupported way of using cassandra.

Gary

Reply via email to