[ 
https://issues.apache.org/jira/browse/SOLR-6134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14018057#comment-14018057
 ] 

David Smiley commented on SOLR-6134:
------------------------------------

One small changed needed to satisfy "ant precommit" is to use a non-default 
ThreadFactory, such as by doing this:
{code:java}
    final ExecutorService executor = 
Executors.newFixedThreadPool(options.goLiveThreads,
        new DefaultSolrThreadFactory("goLive"));
{code}

> MapReduce GoLive code improvements
> ----------------------------------
>
>                 Key: SOLR-6134
>                 URL: https://issues.apache.org/jira/browse/SOLR-6134
>             Project: Solr
>          Issue Type: Improvement
>          Components: contrib - MapReduce
>            Reporter: David Smiley
>            Priority: Minor
>         Attachments: SOLR-6134_GoLive.patch
>
>
> I looked at the GoLive.java source quite a bit and found myself editing the 
> source to make it clearer.  It wasn't hard to understand before but I felt it 
> could be better.  Furthermore, when not in SolrCloud mode, the commit 
> messages are now submitted asynchronously using the same thread pool used for 
> merging.
> This refactoring does away with the inner class "Result", the 
> CompletionService, and any keeping track of Future's/Result's in collections 
> and looping over them.  Fundamentally the code never cared about the result; 
> it just wanted to know if it all worked or not.  This refactoring uses Java's 
> "Phaser" concurrency utility which may seem advanced (especially with the 
> cool name :-) but I find it quite understandable how to use, and is very 
> flexible. I added an inner class implementing Runnable to avoid some 
> duplication across the merge and commit phases.
> The tests pass but I confess to not having used it for real.  I certainly 
> don't feel comfortable committing this until someone does try it; especially 
> try and break it ;-).



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to