use of org.apache.jackrabbit.oak.plugins.index.progress.NodeCounterMBeanEstimator in project jackrabbit-oak by apache.
the class OutOfBandIndexer method configureEstimators.
private void configureEstimators(IndexUpdate indexUpdate) {
StatisticsProvider statsProvider = indexHelper.getStatisticsProvider();
if (statsProvider instanceof MetricStatisticsProvider) {
MetricRegistry registry = ((MetricStatisticsProvider) statsProvider).getRegistry();
indexUpdate.setTraversalRateEstimator(new MetricRateEstimator(REINDEX_LANE, registry));
}
NodeCounterMBeanEstimator estimator = new NodeCounterMBeanEstimator(indexHelper.getNodeStore());
indexUpdate.setNodeCountEstimator(estimator);
}
use of org.apache.jackrabbit.oak.plugins.index.progress.NodeCounterMBeanEstimator in project jackrabbit-oak by apache.
the class AsyncIndexUpdate method configureRateEstimator.
private void configureRateEstimator(IndexUpdate indexUpdate) {
//As metrics is an optional library guard the access with the check
if (statisticsProvider.getClass().getSimpleName().equals("MetricStatisticsProvider")) {
MetricRegistry registry = ((MetricStatisticsProvider) statisticsProvider).getRegistry();
indexUpdate.setTraversalRateEstimator(new MetricRateEstimator(name, registry));
}
NodeCounterMBeanEstimator estimator = new NodeCounterMBeanEstimator(store);
indexUpdate.setNodeCountEstimator(estimator);
}
Aggregations