cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rodgers, Hugh" <>
Subject Running Cassandra Server in an OSGi container
Date Tue, 22 Jul 2014 19:45:40 GMT
Hello -

I have a use case where I need to run the Cassandra Server as an OSGi bundle. I have been
able to embed all of the Cassandra dependencies in an OSGi bundle and run it on Karaf container,
but I am not happy with the approach I have thus far.

Since CassandraDaemon has System.exit() calls in it, if these execute it will bring down my
entire OSGi container rather than just the bundle Cassandra is running in. I hacked up a copy
of CassandraDaemon enough to get it to run in the bundle with no System.exit() calls, but
the Cassandra StorageService is not "aware" of it, i.e., I cannot call the StorageService.registerDaemon(...)
method because my copy of CassandraDaemon does not extend Apache's. hence I am getting exceptions
when I do shutdown my container or restart the bundle because the StorageService and my CassandraDaemon
are not "linked".

I am considering trying to extend Apache's CassandraDaemon and override its setup() method
with a SecurityManager that disables System.exit() calls. This too sounds "hacky".

Does anyone have any better suggestions? Or know of an existing open source project that has
successfully embedded CassandraServer in an OSGi bundle?

I am using Cassandra v2.0.7 and am currently using CQL (vs. Thrift).

Thanks -


View raw message