Differences between revisions 4 and 5
Revision 4 as of 2010-02-21 19:31:00
Size: 922
Editor: StuHood
Comment:
Revision 5 as of 2013-11-14 17:58:32
Size: 983
Editor: GehrigKunz
Comment: statcounter
Deletions are marked like this. Additions are marked like this.
Line 25: Line 25:

{{https://c.statcounter.com/9397521/0/fe557aad/1/|stats}}

WARNING: Cassandra's internal APIs should be considered highly volatile, even after a 1.0 release.

You can run a Cassandra node internal to your own JVM-based code easily. Here's what CassandraDaemon does:

        // initialize keyspaces
        for (String table : Table.getAllTableNames())
        {
            if (logger.isDebugEnabled())
                logger.debug("opening keyspace " + table);
            Table tbl = Table.open(table);
            tbl.onStart();
        }

        // replay the log if necessary
        RecoveryManager.doRecovery();

        // start server internals
        StorageService.instance().initServer();

Then you can use the internal StorageProxy API without going through Thrift.

A higher level embedded cassandra service is described here http://prettyprint.me/2010/02/14/running-cassandra-as-an-embedded-service/ and committed to trunk of v6

stats

Embedding (last edited 2013-11-14 17:58:32 by GehrigKunz)