cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andriy Kopachevsky <kopachev...@gmail.com>
Subject How to stop Cassandra running in embeded mode
Date Thu, 08 Jul 2010 08:44:41 GMT
Hi, we are trying to set up intergation testing for Cassanrda, so we need to
run and stop it as embeded service. Don't have any problem to start
cassandra:

import
org.apache.cassandra.contrib.utils.service.CassandraServiceDataCleaner;

class SomeTestClass {

    @Before
    public void setup() throws TTransportException, IOException,
InterruptedException {


        // make a tmp dir and copy storag-conf.xml and log4j.properties to
it
        copy("/storage-conf.xml", TMP);
        copy("/log4j.properties", TMP);
        System.setProperty("storage-config", TMP);

        cassandra = new EmbeddedCassandraService();
        cassandra.init();
        t = new Thread(cassandra);
        t.setDaemon(true);
        t.start();
   }
}

But this is real problem to stop it, even if you execute t.stop() all other
threads started up internally still alive. Is there are any way to force
cassandra to stop? Maybe invoke some internal cassandra api function or
anything. Thanks.
Andrey.

Mime
View raw message