cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Lerer (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-8281) CQLSSTableWriter close does not work
Date Tue, 25 Nov 2014 13:12:12 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-8281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14224510#comment-14224510
] 

Benjamin Lerer commented on CASSANDRA-8281:
-------------------------------------------

I am not sure that I understand your comment.
What I found while digging in the code was that in {{CQLSSTableWriter}} use {{DatabaseDescriptor}}
which is also use by the cassandra server. If the client mode is not set to true the {{DatabaseDescriptor}}
will launch several threads that are only needed the cassandra server. As those threads are
useless as far as the {{CQLSSTableWriter}} is concerned they should not be started when the
writer is used and by consequence the writer should not need to clause them.
Regarding the problem of Exceptions {{CQLSSTableWriter}} implements {{Closeable}} so users
should use try-with-resources to guaranty that if an Exception is thrown the writer thread
will be closed by the close method of  {{CQLSSTableWriter}}.

> CQLSSTableWriter close does not work
> ------------------------------------
>
>                 Key: CASSANDRA-8281
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8281
>             Project: Cassandra
>          Issue Type: Bug
>          Components: API
>         Environment: Cassandra 2.1.1
>            Reporter: Xu Zhongxing
>            Assignee: Benjamin Lerer
>         Attachments: CASSANDRA-8281.txt
>
>
> I called CQLSSTableWriter.close(). But the program still cannot exit. But the same code
works fine on Cassandra 2.0.10.
> It seems that CQLSSTableWriter cannot be closed, and blocks the program from exit.



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

Mime
View raw message