cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pablo La Greca (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CASSANDRA-8080) Provide support for running cassandra embedded
Date Wed, 08 Oct 2014 02:02:33 GMT
Pablo La Greca created CASSANDRA-8080:
-----------------------------------------

             Summary: Provide support for running cassandra embedded
                 Key: CASSANDRA-8080
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8080
             Project: Cassandra
          Issue Type: New Feature
          Components: Packaging
            Reporter: Pablo La Greca


EmbeddedCassandraService allows to run cassandra embedded. What's missing is a much more clear
interface for running cassandra embedded in other applications.

Running cassandra embedded should be much simpler are the user should be able to run it and
configure it using only an API (no configuraiton file required).

The user should be able to do something like:

CassandraSever cassandra = Cassandra.newInstance(new File("cassandra.yaml"); //creates a cassandra
node using a configuration file

Or

CassandraConfig config = new CassandraConfig().seeds("ip1", "ip2");
CassandraServer cassandra = Cassandra.newInstance(config);

Implementing this type of functionality should be simple since cassandra already converts
the yaml file to a java class. Also there's a system property to change the cassandra configuration
loader.

It should also be possible to have a client that doesn't need to go through the wire to communicate
with Cassandra, users should be able to do just:

CassandraServer cassandra ...
Session session = cassandra.createSession();
session.execute(String.format("CREATE KEYSPACE IF NOT EXISTS %s WITH replication = {'class':'SimpleStrategy',
'replication_factor':2};", applicationName));

This seems to work using directly classes from the package: org.apache.cassandra.transport.messages

One other thing, but this seems far more complex to do, is that it should be possible to create
several cassandra nodes inside a single JVM. This would allow to do much more simpler test
for cassandra functionality.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message