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 Mon, 29 Feb 2016 15:34:40 GMT
Github user keith-turner commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/75#discussion_r54425522
  
    --- Diff: core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java
---
    @@ -699,7 +711,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() {
    +        final MutationSet m = mutationsToSend;
    +
    +        @Override
    +        public void run() {
    +          if (null != m) {
    +            try {
    +              addMutations(m);
    +            } catch (Exception e) {
    +              updateUnknownErrors("Error processing mutation set", e);
    +            }
    +          }
    +        }
    +      });
    +      if (!transferred) {
    +        try {
    +          addMutations(mutationsToSend);
    --- End diff --
    
    I like this.  Its an interesting approach of having multiple threads bin if it happens
to be busy.  All batchwriter code was written w/ assumption that one thread would bin, so
this change needs careful review of all code called by binning code.


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