Search in sources :

Example 16 with UpdateHandler

use of org.apache.solr.update.UpdateHandler in project lucene-solr by apache.

the class SolrCore method initUpdateHandler.

private UpdateHandler initUpdateHandler(UpdateHandler updateHandler) {
    String updateHandlerClass = solrConfig.getUpdateHandlerInfo().className;
    if (updateHandlerClass == null) {
        updateHandlerClass = DirectUpdateHandler2.class.getName();
    }
    final UpdateHandler newUpdateHandler;
    if (updateHandler == null) {
        newUpdateHandler = createUpdateHandler(updateHandlerClass);
    } else {
        newUpdateHandler = createUpdateHandler(updateHandlerClass, updateHandler);
    }
    if (newUpdateHandler instanceof SolrMetricProducer) {
        coreMetricManager.registerMetricProducer("updateHandler", (SolrMetricProducer) newUpdateHandler);
    }
    infoRegistry.put("updateHandler", newUpdateHandler);
    return newUpdateHandler;
}
Also used : UpdateHandler(org.apache.solr.update.UpdateHandler) SolrMetricProducer(org.apache.solr.metrics.SolrMetricProducer) DirectUpdateHandler2(org.apache.solr.update.DirectUpdateHandler2)

Aggregations

UpdateHandler (org.apache.solr.update.UpdateHandler)16 UpdateLog (org.apache.solr.update.UpdateLog)12 Semaphore (java.util.concurrent.Semaphore)11 SolrQueryRequest (org.apache.solr.request.SolrQueryRequest)11 Test (org.junit.Test)11 IOException (java.io.IOException)5 HdfsUpdateLog (org.apache.solr.update.HdfsUpdateLog)4 URISyntaxException (java.net.URISyntaxException)3 AddUpdateCommand (org.apache.solr.update.AddUpdateCommand)2 Gauge (com.codahale.metrics.Gauge)1 Meter (com.codahale.metrics.Meter)1 Metric (com.codahale.metrics.Metric)1 FileNotFoundException (java.io.FileNotFoundException)1 Constructor (java.lang.reflect.Constructor)1 NoSuchFileException (java.nio.file.NoSuchFileException)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 List (java.util.List)1 Map (java.util.Map)1 Random (java.util.Random)1