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 Tue, 01 Mar 2016 16:14:54 GMT
Github user keith-turner commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/75#discussion_r54590327
  
    --- Diff: core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java
---
    @@ -699,7 +710,33 @@ else if (Tables.getTableState(context.getInstance(), table) == TableState.OFFLIN
     
         }
     
    -    void addMutations(MutationSet mutationsToSend) {
    +    void queueMutations(final MutationSet mutationsToSend) throws InterruptedException
{
    +      if (null == mutationsToSend)
    +        return;
    +      boolean transferred = queue.tryTransfer(new Runnable() {
    --- End diff --
    
    I was playing around with this locally.  I added some prints and noticed the background
thread was never binning.  This was because the background thread was never started (adding
vial thread pool API will start it).  I fixed this issue by prestarting the threads, however
 I think it would be safer to add using the Executor API (because threads could idle time
out).  I was reading and found the following.
    
     * ThreadPoolExecutor javadocs recommend only using the queue for debugging and monitoring
     * The same thing can be accomplished using ThreadPoolExecutor.CallerRunsPolicy() and
a SynchronousQueue()
    
    I got .CallerRunsPolicy+SynchronousQueue working here keith-turner/accumulo@bb28195
    
    I made some modifications to BatchWriterFlushIT in keith-turner/accumulo@3d3c252 .  Running
that I was able to see that sometimes the background thread binned and sometimes the foreground
thread binned.



---
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