Default config for testing "test-embedded-cassandra.yaml"
Use this to locate classpath elements from the current classpath to add to the classpath of the launched Cassandra.
Use this to locate classpath elements from the current classpath to add to the classpath of the launched Cassandra.
This is particularly useful if you want a custom logging, you can use this to ensure that the directory that your log file is in is on the classpath of the forked Cassandra process, for example:
CassandraLauncher.start(
cassandraDirectory,
CassandraLauncher.DefaultTestConfigResource,
clean = true,
port = 0,
CassandraLauncher.classpathForResources("logback.xml")
)
Main method to start Cassandra, see #start.
Main method to start Cassandra, see #start.
Note that cassandra-all
jar must be in classpath.
port can be defined with
-DCassandraLauncher.port=4000,
default is the
randomPort
-DCassandraLauncher.clean=trueclean
can be defined with ,
default is
false
-DCassandraLauncher.directory=target/embedded-cassandradirectory
can be defined with ,
default is
target/embedded-cassandra
-DCassandraLauncher.configResource=test-embedded-cassandra.yamlconfigResource
yaml configuration loaded from classpath,
can be defined with ,
default is defined in CassandraLauncher#DefaultTestConfigResource,
i.e.
test-embedded-cassandra.yaml
The random free port that will be used if port=0
is
specified in the start
method.
Start Cassandra
Start Cassandra
the data directory to use
yaml configuration loaded from classpath, default configuration for testing is defined in CassandraLauncher#DefaultTestConfigResource
if true
all files in the data directory will be deleted
before starting Cassandra
the native_transport_port
to use, if 0 a random
free port is used, which can be retrieved (before starting)
with CassandraLauncher.randomPort.
Any additional jars/directories to add to the classpath. Use CassandraLauncher#classpathForResources to assist in calculating this.
the host to bind the embeded Cassandra to. If None, then 127.0.0.1 is used.
akka.persistence.cassandra.testkit.CassandraLauncher.CleanFailedException
if clean
is true
and removal of the directory fails
Start Cassandra
Start Cassandra
the data directory to use
yaml configuration loaded from classpath, default configuration for testing is defined in CassandraLauncher#DefaultTestConfigResource
if true
all files in the data directory will be deleted
before starting Cassandra
the native_transport_port
to use, if 0 a random
free port is used, which can be retrieved (before starting)
with CassandraLauncher.randomPort.
Any additional jars/directories to add to the classpath. Use CassandraLauncher#classpathForResources to assist in calculating this.
akka.persistence.cassandra.testkit.CassandraLauncher.CleanFailedException
if clean
is true
and removal of the directory fails
Start Cassandra
Start Cassandra
the data directory to use
yaml configuration loaded from classpath, default configuration for testing is defined in CassandraLauncher#DefaultTestConfigResource
if true
all files in the data directory will be deleted
before starting Cassandra
the native_transport_port
to use, if 0 a random
free port is used, which can be retrieved (before starting)
with CassandraLauncher.randomPort.
akka.persistence.cassandra.testkit.CassandraLauncher.CleanFailedException
if clean
is true
and removal of the directory fails
Stops Cassandra.
Stops Cassandra. However, it will not be possible to start Cassandra again in same JVM.
Starts Cassandra in current JVM. There can only be one Cassandra instance per JVM, but keyspaces can be used for isolation.