From 9d597dce47c3f9edc52cab0b70d9ca912a0c94d2 Mon Sep 17 00:00:00 2001 From: nabarun Date: Mon, 6 Mar 2017 16:51:01 -0800 Subject: [PATCH 1/2] GEODE-2604: Added javadoc comments to LuceneIndexMetrics.java --- .../lucene/management/LuceneIndexMetrics.java | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) diff --git a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/management/LuceneIndexMetrics.java b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/management/LuceneIndexMetrics.java index de8975853a6f..8b69ed56a96c 100644 --- a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/management/LuceneIndexMetrics.java +++ b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/management/LuceneIndexMetrics.java @@ -14,6 +14,8 @@ */ package org.apache.geode.cache.lucene.management; +import org.apache.geode.cache.lucene.LuceneIndex; + import java.beans.ConstructorProperties; public class LuceneIndexMetrics { @@ -92,82 +94,182 @@ public LuceneIndexMetrics(String regionPath, String indexName, int queryExecutio this.documents = documents; } + /** + * Returns the {@link String} path for the region on which the {@link LuceneIndex} is created + * + * @return String value of the region path on the Lucene Index is created + */ public String getRegionPath() { return this.regionPath; } + /** + * Returns the {@link String} name of the {@link LuceneIndex} created + * + * @return String value of the index name + */ public String getIndexName() { return this.indexName; } + /** + * Returns the number of query executions using the {@link LuceneIndex} + * + * @return Number of queries executed using this Lucene index + */ public int getQueryExecutions() { return this.queryExecutions; } + /** + * Returns the time duration for execution of queries using the {@link LuceneIndex} + * + * @return long value for the time consumed in the execution of queries using this Lucene Index + */ public long getQueryExecutionTime() { return this.queryExecutionTime; } + /** + * Returns the rate of query execution using the {@link LuceneIndex} + * + * @return the rate of query execution using the Lucene Index + */ public float getQueryRate() { return this.queryRate; } + /** + * Returns the average latency for query executions using the {@link LuceneIndex} + * + * @return the average latency for query executions using the Lucene Index + */ public long getQueryRateAverageLatency() { return this.queryRateAverageLatency; } + /** + * Returns the number of query executions in progress which are using the {@link LuceneIndex} + * + * @return the number of query executions in progress which are using the Lucene Index + */ public int getQueryExecutionsInProgress() { return this.queryExecutionsInProgress; } + /** + * Returns the number of hits for the query execution using the {@link LuceneIndex} + * + * @return the number of hit for the query execution using the Lucene Index + */ public long getQueryExecutionTotalHits() { return this.queryExecutionTotalHits; } + /** + * Returns the number of update operations on the {@link LuceneIndex} + * + * @return the number of update operations on the Lucene Index + */ public int getUpdates() { return this.updates; } + /** + * Returns the time consumed for the update operations on the {@link LuceneIndex} + * + * @return the time consumed for the update operations on the Lucene Index + */ public long getUpdateTime() { return this.updateTime; } + /** + * Returns the rate at which update operations are executed on the {@link LuceneIndex} + * + * @return rate at which update operations are executed on the {@link LuceneIndex} + */ public float getUpdateRate() { return this.updateRate; } + /** + * Returns the average latency for the update operations on the {@link LuceneIndex} + * + * @return the average latency for the update operations on the Lucene Index + */ public long getUpdateRateAverageLatency() { return this.updateRateAverageLatency; } + /** + * Returns the number of update operations in progress for the {@link LuceneIndex} + * + * @return the number of update operations in progress for the Lucene Index + */ public int getUpdatesInProgress() { return this.updatesInProgress; } + /** + * Returns the number of commit operation executed on the {@link LuceneIndex} + * + * @return the number of commit operation executed on the Lucene Index + */ public int getCommits() { return this.commits; } + /** + * Returns the time consumed by the commit operations on the {@link LuceneIndex} + * + * @return the time consumed by the commit operations on the Lucene Index + */ public long getCommitTime() { return this.commitTime; } + /** + * Returns the rate of commit operations on the {@link LuceneIndex} + * + * @return the rate of commit operations on the Lucene Index + */ public float getCommitRate() { return this.commitRate; } + /** + * Returns the average latency for the commit operations using the {@link LuceneIndex} + * + * @return Returns the average latency for the commit operations using the Lucene Index + */ public long getCommitRateAverageLatency() { return this.commitRateAverageLatency; } + /** + * Returns the number of commit operations in progress for the {@link LuceneIndex} + * + * @return Returns the number of commit operations in progress for the Lucene Indexes + */ public int getCommitsInProgress() { return this.commitsInProgress; } + /** + * Returns the number of documents indexed by {@link LuceneIndex} + * + * @return Returns the number of documents indexed by Lucene + */ public int getDocuments() { return documents; } + /** + * Outputs the string message containing all the stats stored for the {@link LuceneIndex} + * + * @return the string message containing all the stats stored for the {@link LuceneIndex} + */ @Override public String toString() { return new StringBuilder().append(getClass().getSimpleName()).append("[").append("regionPath=") From ddfef69273d5d6772e1e9aef5d20cacfd7c245d7 Mon Sep 17 00:00:00 2001 From: nabarun Date: Mon, 6 Mar 2017 17:30:07 -0800 Subject: [PATCH 2/2] GEODE-2604: Added measurement units to the javadoc comments --- .../lucene/management/LuceneIndexMetrics.java | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/management/LuceneIndexMetrics.java b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/management/LuceneIndexMetrics.java index 8b69ed56a96c..24d14c1983ba 100644 --- a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/management/LuceneIndexMetrics.java +++ b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/management/LuceneIndexMetrics.java @@ -124,7 +124,8 @@ public int getQueryExecutions() { /** * Returns the time duration for execution of queries using the {@link LuceneIndex} * - * @return long value for the time consumed in the execution of queries using this Lucene Index + * @return long value for the time in nanoseconds consumed in the execution of queries using this + * Lucene Index */ public long getQueryExecutionTime() { return this.queryExecutionTime; @@ -142,7 +143,7 @@ public float getQueryRate() { /** * Returns the average latency for query executions using the {@link LuceneIndex} * - * @return the average latency for query executions using the Lucene Index + * @return the average latency for query executions in nanoseconds using the Lucene Index */ public long getQueryRateAverageLatency() { return this.queryRateAverageLatency; @@ -160,7 +161,7 @@ public int getQueryExecutionsInProgress() { /** * Returns the number of hits for the query execution using the {@link LuceneIndex} * - * @return the number of hit for the query execution using the Lucene Index + * @return the number of hits for the query execution using the Lucene Index */ public long getQueryExecutionTotalHits() { return this.queryExecutionTotalHits; @@ -178,7 +179,7 @@ public int getUpdates() { /** * Returns the time consumed for the update operations on the {@link LuceneIndex} * - * @return the time consumed for the update operations on the Lucene Index + * @return the time consumed in nanoseconds for the update operations on the Lucene Index */ public long getUpdateTime() { return this.updateTime; @@ -196,7 +197,7 @@ public float getUpdateRate() { /** * Returns the average latency for the update operations on the {@link LuceneIndex} * - * @return the average latency for the update operations on the Lucene Index + * @return the average latency for the update operations in nanoseconds on the Lucene Index */ public long getUpdateRateAverageLatency() { return this.updateRateAverageLatency; @@ -212,9 +213,9 @@ public int getUpdatesInProgress() { } /** - * Returns the number of commit operation executed on the {@link LuceneIndex} + * Returns the number of commit operations executed on the {@link LuceneIndex} * - * @return the number of commit operation executed on the Lucene Index + * @return the number of commit operations executed on the Lucene Index */ public int getCommits() { return this.commits; @@ -223,7 +224,7 @@ public int getCommits() { /** * Returns the time consumed by the commit operations on the {@link LuceneIndex} * - * @return the time consumed by the commit operations on the Lucene Index + * @return the time consumed in nanoseconds by the commit operations on the Lucene Index */ public long getCommitTime() { return this.commitTime; @@ -241,7 +242,8 @@ public float getCommitRate() { /** * Returns the average latency for the commit operations using the {@link LuceneIndex} * - * @return Returns the average latency for the commit operations using the Lucene Index + * @return Returns the average latency for the commit operations in nanoseconds using the Lucene + * Index */ public long getCommitRateAverageLatency() { return this.commitRateAverageLatency; @@ -268,7 +270,7 @@ public int getDocuments() { /** * Outputs the string message containing all the stats stored for the {@link LuceneIndex} * - * @return the string message containing all the stats stored for the {@link LuceneIndex} + * @return the string message containing all the stats stored for the Lucene Index */ @Override public String toString() {