Github user joshelser commented on a diff in the pull request:
https://github.com/apache/accumulo/pull/75#discussion_r54289506
--- Diff:
core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java
---
@@ -699,7 +701,16 @@ else if (Tables.getTableState(context.getInstance(),
table) == TableState.OFFLIN
}
- void addMutations(MutationSet mutationsToSend) {
+ void queueMutations(final MutationSet mutationsToSend) {
+ queueThreadPool.submit(new Runnable() {
--- End diff --
I think it be simpler to use a producer/consumer model for the
`MutationSet`'s with a single consumer thread instead of constantly submitting
new `Runnable`'s. The consumer thread can essentially do the same thing: poll
for a `MutationSet`, and then run `addMutations` with that object. It
eliminates the need for another ExecutorService and repeatedly creating new
Runnables. We might also be able to implement some back-pressure on the client
via that Queue as well.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---