Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-6134

MapReduce GoLive code improvements

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: contrib - MapReduce
    • Labels:
      None

      Description

      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 .

        Attachments

        1. SOLR-6134_GoLive.patch
          11 kB
          David Smiley

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                dsmiley David Smiley
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: