incubator-cassandra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Ellis <jbel...@gmail.com>
Subject Re: Can't stop org.apache.cassandra.service.StorageService.stopClient()
Date Fri, 21 May 2010 03:50:14 GMT
Can you submit a patch to https://issues.apache.org/jira/browse/CASSANDRA ?

Thanks!

On Thu, May 20, 2010 at 7:39 PM, Peng Guo <gpcuster@gmail.com> wrote:
> Hi All
>
> This is my test code:
>    public static void main(String[] args) throws IOException,
> InterruptedException {
>        System.setProperty("storage-config",
> "D:\\apache-cassandra-0.6.1\\conf");
>
>        StorageService.instance.initClient();
>
>        StorageService.instance.stopClient();
>    }
>
> I find when I run this code, the process can't stop.
>
> for I use the jstack look at this process, I find the CONSISTENCY-MANAGER
> thread is still running.
>
> So I modify the code in StorageService.java  like this:
>
>    public void stopClient()
>    {
>        Gossiper.instance.unregister(this);
>        Gossiper.instance.stop();
>        MessagingService.shutdown();
>        StageManager.shutdownNow();
>
>        // this is added to stop the CONSISTENCY-MANAGER thread
>        consistencyManager_.shutdownNow();
>    }
>
> Can I commit this code in to svn branch?
>
> Thanks.
>
> --
> Regards
>   Peng Guo
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com

Mime
View raw message