accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From keith-turner <...@git.apache.org>
Subject [GitHub] accumulo pull request: ACCUMULO-1755: Modified TSBW so that all cl...
Date Sat, 27 Feb 2016 00:39:00 GMT
Github user keith-turner commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/75#discussion_r54321821
  
    --- Diff: core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java
---
    @@ -638,6 +648,21 @@ public MutationWriter(int numSendThreads) {
           queued = new HashSet<String>();
           sendThreadPool = new SimpleThreadPool(numSendThreads, this.getClass().getName());
           locators = new HashMap<String,TabletLocator>();
    +      binTimer.schedule(new TimerTask() {
    +        @Override
    +        public void run() {
    +          MutationSet m = queue.poll();
    +          while (null != m) {
    +            try {
    +              addMutations(m);
    +            } catch (Exception e) {
    +              updateUnknownErrors("Error processing mutation set", e);
    +            }
    +            m = queue.poll();
    +          }
    +        }
    +      }, 0, 500);
    --- End diff --
    
    > Well, in the previous revision I was adding a MutationSet to an ExecutorService that
had an unbounded queue and 1 thread. That's not immediate
    
    Yeah, its certainly not immediate.   However, it probably much less than 1ms between adding
to thread pool and thread calling run() on Runnable (when thread is idle).   Relative to ~250ms,
its like kinda immediate.
    
    > Can MutationSets be binned concurrently?
    
    I have no idea.  Could not say yes w/o much more review of the code than I want to do
late on a Fri afternoon :).  I suspect something would blow up.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message