Stop in the name of Love

Hi
As part of put tests we try and stop elastic , delete the index dir , and re start later - just so we start with a clean slate.

we do :

    if (node != null) {
        node.close();
    }

    if (elasticSearchClient != null) {
        elasticSearchClient.close();
    }

however occasionally when the call returns the files are still locked and we fail to delete the directory.
Is there a better way?

Cheers
Z

If you can post a recreation I can have a look. Usually its better to close the client before the node itself (just to create less ripples).
On Tuesday, April 5, 2011 at 7:12 PM, zohar wrote:

Hi
As part of put tests we try and stop elastic , delete the index dir , and
re start later - just so we start with a clean slate.

we do :

if (node != null) {
node.close();
}

if (elasticSearchClient != null) {
elasticSearchClient.close();
}

however occasionally when the call returns the files are still locked and we
fail to delete the directory.
Is there a better way?

Cheers
Z

--
View this message in context: http://elasticsearch-users.115913.n3.nabble.com/Stop-in-the-name-of-Love-tp2780480p2780480.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.