Search in sources :

Example 6 with SolrMetricProducer

use of org.apache.solr.metrics.SolrMetricProducer 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)

Example 7 with SolrMetricProducer

use of org.apache.solr.metrics.SolrMetricProducer in project lucene-solr by apache.

the class SolrCore method registerInfoBean.

public void registerInfoBean(String name, SolrInfoBean solrInfoBean) {
    infoRegistry.put(name, solrInfoBean);
    if (solrInfoBean instanceof SolrMetricProducer) {
        SolrMetricProducer producer = (SolrMetricProducer) solrInfoBean;
        coreMetricManager.registerMetricProducer(name, producer);
    }
}
Also used : SolrMetricProducer(org.apache.solr.metrics.SolrMetricProducer)

Aggregations

SolrMetricProducer (org.apache.solr.metrics.SolrMetricProducer)7 SolrInfoBean (org.apache.solr.core.SolrInfoBean)4 Counter (com.codahale.metrics.Counter)3 ObjectInstance (javax.management.ObjectInstance)3 Test (org.junit.Test)3 ArrayList (java.util.ArrayList)2 Random (java.util.Random)2 PluginInfo (org.apache.solr.core.PluginInfo)2 SolrMetricManager (org.apache.solr.metrics.SolrMetricManager)2 IOException (java.io.IOException)1 Path (java.nio.file.Path)1 HashMap (java.util.HashMap)1 ExecutionException (java.util.concurrent.ExecutionException)1 ExecutorService (java.util.concurrent.ExecutorService)1 Future (java.util.concurrent.Future)1 BackupRepositoryFactory (org.apache.solr.core.backup.repository.BackupRepositoryFactory)1 StandardRequestHandler (org.apache.solr.handler.StandardRequestHandler)1 CollectionsHandler (org.apache.solr.handler.admin.CollectionsHandler)1 ConfigSetsHandler (org.apache.solr.handler.admin.ConfigSetsHandler)1 CoreAdminHandler (org.apache.solr.handler.admin.CoreAdminHandler)1