Hi, I am having the same problem and this is my code:
val en = Enumerator.enumerate(insertCollection)
val db = connect()
val zmaps:BSONCollection = db("zmap2")
val bInsert = insertCollection.map(implicitly[zmaps.ImplicitlyDocumentProducer](_))
val bulkResult1: Future[MultiBulkWriteResult] = zmaps.bulkInsert(ordered = false)( bInsert: _*)
while(!bulkResult1.isCompleted){
Thread.sleep(1)
}
insertCollection.clear()
I do bulk inserts by 100.000 records at the same time. I need to insert millions of documents(just once) the driver and it takes some time because I am benchmarking on a 'bad machine' . So I want to do it sychronized for a test, hence the Sleep(1). If I dont do this Java just eats my memory with many started threads.
But I also get the [The entire node set is unreachable, is there a network problem?] issue.
Using 0.11
Op maandag 12 oktober 2015 15:39:58 UTC+2 schreef Cédric Chantepie: