use of org.apache.geode.cache.lucene.management.LuceneServiceMXBean in project geode by apache.
the class LuceneManagementDUnitTest method verifyAllMBeanProxyIndexMetrics.
private static void verifyAllMBeanProxyIndexMetrics(String regionName, int numRegionIndexes, int numTotalIndexes) {
Set<DistributedMember> members = GemFireCacheImpl.getInstance().getDistributionManager().getOtherNormalDistributionManagerIds();
for (DistributedMember member : members) {
LuceneServiceMXBean mbean = getMBeanProxy(member);
verifyMBeanIndexMetrics(mbean, regionName, numRegionIndexes, numTotalIndexes);
}
}
use of org.apache.geode.cache.lucene.management.LuceneServiceMXBean in project geode by apache.
the class LuceneManagementDUnitTest method getMBean.
private LuceneServiceMXBean getMBean() {
ObjectName objectName = MBeanJMXAdapter.getCacheServiceMBeanName(getSystem().getDistributedMember(), "LuceneService");
assertNotNull(getManagementService().getMBeanInstance(objectName, LuceneServiceMXBean.class));
return getManagementService().getMBeanInstance(objectName, LuceneServiceMXBean.class);
}
use of org.apache.geode.cache.lucene.management.LuceneServiceMXBean in project geode by apache.
the class LuceneManagementDUnitTest method verifyMBeanIndexMetricsValues.
private void verifyMBeanIndexMetricsValues(String regionName, String indexName, int expectedPuts, int expectedQueries, int expectedHits) {
// Get index metrics from all members
Set<DistributedMember> members = GemFireCacheImpl.getInstance().getDistributionManager().getOtherNormalDistributionManagerIds();
int totalCommits = 0, totalUpdates = 0, totalDocuments = 0, totalQueries = 0, totalHits = 0;
for (DistributedMember member : members) {
LuceneServiceMXBean mbean = getMBeanProxy(member);
LuceneIndexMetrics metrics = mbean.listIndexMetrics(regionName, indexName);
assertNotNull(metrics);
totalCommits += metrics.getCommits();
totalUpdates += metrics.getUpdates();
totalDocuments += metrics.getDocuments();
totalQueries += metrics.getQueryExecutions();
totalHits += metrics.getQueryExecutionTotalHits();
}
// Verify index metrics counts
assertEquals(expectedPuts, totalCommits);
assertEquals(expectedPuts, totalUpdates);
assertEquals(expectedPuts, totalDocuments);
assertEquals(expectedQueries, totalQueries);
assertEquals(expectedHits, totalHits);
}
use of org.apache.geode.cache.lucene.management.LuceneServiceMXBean in project geode by apache.
the class LuceneManagementDUnitTest method verifyAllMBeanIndexMetrics.
private void verifyAllMBeanIndexMetrics(String regionName, int numRegionIndexes, int numTotalIndexes) {
LuceneServiceMXBean mbean = getMBean();
verifyMBeanIndexMetrics(mbean, regionName, numRegionIndexes, numTotalIndexes);
}
Aggregations