use of org.apache.solr.core.MetricsConfig in project lucene-solr by apache.
the class TestHarness method buildTestNodeConfig.
public static NodeConfig buildTestNodeConfig(SolrResourceLoader loader) {
CloudConfig cloudConfig = new CloudConfig.CloudConfigBuilder(System.getProperty("host"), Integer.getInteger("hostPort", 8983), System.getProperty("hostContext", "")).setZkClientTimeout(Integer.getInteger("zkClientTimeout", 30000)).build();
if (System.getProperty("zkHost") == null)
cloudConfig = null;
UpdateShardHandlerConfig updateShardHandlerConfig = new UpdateShardHandlerConfig(UpdateShardHandlerConfig.DEFAULT_MAXUPDATECONNECTIONS, UpdateShardHandlerConfig.DEFAULT_MAXUPDATECONNECTIONSPERHOST, 30000, 30000, UpdateShardHandlerConfig.DEFAULT_METRICNAMESTRATEGY, UpdateShardHandlerConfig.DEFAULT_MAXRECOVERYTHREADS);
// universal default metric reporter
Map<String, Object> attributes = new HashMap<>();
attributes.put("name", "default");
attributes.put("class", SolrJmxReporter.class.getName());
PluginInfo defaultPlugin = new PluginInfo("reporter", attributes);
MetricsConfig metricsConfig = new MetricsConfig.MetricsConfigBuilder().setMetricReporterPlugins(new PluginInfo[] { defaultPlugin }).build();
return new NodeConfig.NodeConfigBuilder("testNode", loader).setUseSchemaCache(Boolean.getBoolean("shareSchema")).setCloudConfig(cloudConfig).setUpdateShardHandlerConfig(updateShardHandlerConfig).setMetricsConfig(metricsConfig).build();
}
Aggregations