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

ASF GitHub Bot commented on NUTCH-1480:
---------------------------------------

r0ann3l commented on issue #218: fix for NUTCH-1480 contributed by r0ann3l
URL: https://github.com/apache/nutch/pull/218#issuecomment-358355731
 
 
   Hi @sebastian-nagel:
   In this case I propose to use an internal CACHE object, as the 
PluginRepository does, to store the IndexWriters object. The code could be 
something like this:
   ```
   private static final WeakHashMap<String, IndexWriters> CACHE = new 
WeakHashMap<>();
   public static synchronized IndexWriters get(Configuration conf) {
     String uuid = NutchConfiguration.getUUID(conf);
     if (uuid == null) {
       uuid = "nonNutchConf@" + conf.hashCode();
     }
     return CACHE.computeIfAbsent(uuid, k -> new IndexWriters(conf));
   }
   ```
   What do you think?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> SolrIndexer to write to multiple servers.
> -----------------------------------------
>
>                 Key: NUTCH-1480
>                 URL: https://issues.apache.org/jira/browse/NUTCH-1480
>             Project: Nutch
>          Issue Type: Improvement
>          Components: indexer
>            Reporter: Markus Jelsma
>            Assignee: Markus Jelsma
>            Priority: Minor
>         Attachments: NUTCH-1480-1.6.1.patch, 
> adding-support-for-sharding-indexer-for-solr.patch
>
>
> SolrUtils should return an array of SolrServers and read the SolrUrl as a 
> comma delimited list of URL's using Configuration.getString(). SolrWriter 
> should be able to handle this list of SolrServers.
> This is useful if you want to send documents to multiple servers if no 
> replication is available or if you want to send documents to multiple NOCs.
> edit:
> This does not replace NUTCH-1377 but complements it. With NUTCH-1377 this 
> issue allows you to index to multiple SolrCloud clusters at the same time.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to