Ok, so how do I close the client? I have something like this:
main(){
MyIndexer indexer();
for (doc=0; doc <n; doc ++)
indexer.pushDocumentToBulk(doc);
indexer.Shutdown();
}
class MyIndexer(){
//create client
// MyBulkProcesor myBulk;
//PushDocumentToBulk(Doc)
void ShutDown(){
myBulk.Close();
//client.close() ; //This creates No node available exception here, my
guess bulk is still processing ?
}
}
class MyBulkProcessor(){
BlulkProcessor bulk;
@BeforeBulk ...
@AfterBulk ....
PushDocumentToBulk() { ..push doc ..}
void Close(){ bulk.close(); }
}
On Tuesday, April 22, 2014 5:42:23 PM UTC-4, Jörg Prante wrote:
>
> No, BulkProcessor does not close the client.
>
> Jörg
>
>
> On Tue, Apr 22, 2014 at 11:03 PM, IronMan2014 <[email protected]<javascript:>
> > wrote:
>
>> bulkProcessor.close();
>>
>> Does this also close the transportClient? When I follow up the above line
>> with client.close(), I get no available exception.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "elasticsearch" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/elasticsearch/a923766f-1f70-4e78-8b0f-f443e16a2cd7%40googlegroups.com<https://groups.google.com/d/msgid/elasticsearch/a923766f-1f70-4e78-8b0f-f443e16a2cd7%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/70253f01-fb50-46fe-aa9b-0336d5b70d1c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.