Question

What happens when you add a collection of Mutations to a BatchWriter whose overall size exceeds the set buffer? Does the BatchWriter just say okay, I'll process what I am set to then get to the rest afterwards?

Was it helpful?

Solution

An Accumulo BatchWriter will auto-flush its current batch when its buffer gets full. The API also allows you to add Mutations with an Iterable. This is not the same as adding a collection. When you use this, you're not adding the whole collection at once. Instead, what you're really doing is providing a source feed of Mutations to be added to the current batch one at a time. It may be that the batch will be flushed before the entire collection has completed its iteration.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top