You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by kh...@apache.org on 2017/03/17 20:11:03 UTC
[28/49] geode git commit: GEODE-2620: Rate stats removed from
LuceneIndexMetrics
GEODE-2620: Rate stats removed from LuceneIndexMetrics
* Commit Rate, update rate and query rate removed from LuceneIndexMetrics
* They can be added back again when the getRate method in StatsRate.java is fixed
This closes #418
Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/5e200db2
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/5e200db2
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/5e200db2
Branch: refs/heads/feature/GEODE-2420
Commit: 5e200db252352b84a36dce1470ae5f0e7f087379
Parents: 016f07a
Author: nabarun <nn...@pivotal.io>
Authored: Tue Mar 7 15:05:47 2017 -0800
Committer: Ken Howe <kh...@pivotal.io>
Committed: Fri Mar 17 13:09:45 2017 -0700
----------------------------------------------------------------------
.../management/LuceneIndexStatsMonitor.java | 22 ++-----
.../lucene/management/LuceneIndexMetrics.java | 66 ++++----------------
2 files changed, 17 insertions(+), 71 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/geode/blob/5e200db2/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/management/LuceneIndexStatsMonitor.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/management/LuceneIndexStatsMonitor.java b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/management/LuceneIndexStatsMonitor.java
index 8d7d7ca..26eeff6 100644
--- a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/management/LuceneIndexStatsMonitor.java
+++ b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/management/LuceneIndexStatsMonitor.java
@@ -24,16 +24,10 @@ import org.apache.geode.management.internal.beans.stats.StatsRate;
public class LuceneIndexStatsMonitor extends MBeanStatsMonitor {
- private StatsRate updateRate;
-
private StatsAverageLatency updateRateAverageLatency;
- private StatsRate commitRate;
-
private StatsAverageLatency commitRateAverageLatency;
- private StatsRate queryRate;
-
private StatsAverageLatency queryRateAverageLatency;
public static final String LUCENE_SERVICE_MXBEAN_MONITOR_PREFIX = "LuceneServiceMXBeanMonitor_";
@@ -45,11 +39,6 @@ public class LuceneIndexStatsMonitor extends MBeanStatsMonitor {
}
private void configureMetrics() {
- this.queryRate = new StatsRate(StatsKey.QUERIES, StatType.INT_TYPE, this);
-
- this.updateRate = new StatsRate(StatsKey.UPDATES, StatType.INT_TYPE, this);
-
- this.commitRate = new StatsRate(StatsKey.COMMITS, StatType.INT_TYPE, this);
this.queryRateAverageLatency =
new StatsAverageLatency(StatsKey.QUERIES, StatType.INT_TYPE, StatsKey.QUERY_TIME, this);
@@ -64,29 +53,26 @@ public class LuceneIndexStatsMonitor extends MBeanStatsMonitor {
protected LuceneIndexMetrics getIndexMetrics(LuceneIndex index) {
int queryExecutions = getStatistic(StatsKey.QUERIES).intValue();
long queryExecutionTime = getStatistic(StatsKey.QUERY_TIME).longValue();
- float queryRateValue = this.queryRate.getRate();
long queryRateAverageLatencyValue = this.queryRateAverageLatency.getAverageLatency();
int queryExecutionsInProgress = getStatistic(StatsKey.QUERIES_IN_PROGRESS).intValue();
long queryExecutionTotalHits = getStatistic(StatsKey.QUERIES_TOTAL_HITS).longValue();
int updates = getStatistic(StatsKey.UPDATES).intValue();
long updateTime = getStatistic(StatsKey.UPDATE_TIME).longValue();
- float updateRateValue = this.updateRate.getRate();
long updateRateAverageLatencyValue = this.updateRateAverageLatency.getAverageLatency();
int updatesInProgress = getStatistic(StatsKey.UPDATES_IN_PROGRESS).intValue();
int commits = getStatistic(StatsKey.COMMITS).intValue();
long commitTime = getStatistic(StatsKey.COMMIT_TIME).longValue();
- float commitRateValue = this.commitRate.getRate();
long commitRateAverageLatencyValue = this.commitRateAverageLatency.getAverageLatency();
int commitsInProgress = getStatistic(StatsKey.COMMITS_IN_PROGRESS).intValue();
int documents = getStatistic(StatsKey.DOCUMENTS).intValue();
return new LuceneIndexMetrics(index.getRegionPath(), index.getName(), queryExecutions,
- queryExecutionTime, queryRateValue, queryRateAverageLatencyValue, queryExecutionsInProgress,
- queryExecutionTotalHits, updates, updateTime, updateRateValue,
- updateRateAverageLatencyValue, updatesInProgress, commits, commitTime, commitRateValue,
- commitRateAverageLatencyValue, commitsInProgress, documents);
+ queryExecutionTime, queryRateAverageLatencyValue, queryExecutionsInProgress,
+ queryExecutionTotalHits, updates, updateTime, updateRateAverageLatencyValue,
+ updatesInProgress, commits, commitTime, commitRateAverageLatencyValue, commitsInProgress,
+ documents);
}
}
http://git-wip-us.apache.org/repos/asf/geode/blob/5e200db2/geode-lucene/src/main/java/org/apache/geode/cache/lucene/management/LuceneIndexMetrics.java
----------------------------------------------------------------------
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 24d14c1..1d7984d 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
@@ -28,8 +28,6 @@ public class LuceneIndexMetrics {
private final long queryExecutionTime;
- private final float queryRate;
-
private final long queryRateAverageLatency;
private final int queryExecutionsInProgress;
@@ -40,8 +38,6 @@ public class LuceneIndexMetrics {
private final long updateTime;
- private final float updateRate;
-
private final long updateRateAverageLatency;
private final int updatesInProgress;
@@ -50,8 +46,6 @@ public class LuceneIndexMetrics {
private final long commitTime;
- private final float commitRate;
-
private final long commitRateAverageLatency;
private final int commitsInProgress;
@@ -63,32 +57,27 @@ public class LuceneIndexMetrics {
* an instance of this class.
*/
@ConstructorProperties({"regionPath", "indexName", "queryExecutions", "queryExecutionTime",
- "queryRate", "queryRateAverageLatency", "queryExecutionsInProgress",
- "queryExecutionTotalHits", "updates", "updateTime", "updateRate", "updateRateAverageLatency",
- "updatesInProgress", "commits", "commitTime", "commitRate", "commitRateAverageLatency",
- "commitsInProgress", "documents"})
+ "queryRateAverageLatency", "queryExecutionsInProgress", "queryExecutionTotalHits", "updates",
+ "updateTime", "updateRateAverageLatency", "updatesInProgress", "commits", "commitTime",
+ "commitRateAverageLatency", "commitsInProgress", "documents"})
public LuceneIndexMetrics(String regionPath, String indexName, int queryExecutions,
- long queryExecutionTime, float queryRate, long queryRateAverageLatency,
- int queryExecutionsInProgress, long queryExecutionTotalHits, int updates, long updateTime,
- float updateRate, long updateRateAverageLatency, int updatesInProgress, int commits,
- long commitTime, float commitRate, long commitRateAverageLatency, int commitsInProgress,
- int documents) {
+ long queryExecutionTime, long queryRateAverageLatency, int queryExecutionsInProgress,
+ long queryExecutionTotalHits, int updates, long updateTime, long updateRateAverageLatency,
+ int updatesInProgress, int commits, long commitTime, long commitRateAverageLatency,
+ int commitsInProgress, int documents) {
this.regionPath = regionPath;
this.indexName = indexName;
this.queryExecutions = queryExecutions;
this.queryExecutionTime = queryExecutionTime;
- this.queryRate = queryRate;
this.queryRateAverageLatency = queryRateAverageLatency;
this.queryExecutionsInProgress = queryExecutionsInProgress;
this.queryExecutionTotalHits = queryExecutionTotalHits;
this.updates = updates;
this.updateTime = updateTime;
- this.updateRate = updateRate;
this.updateRateAverageLatency = updateRateAverageLatency;
this.updatesInProgress = updatesInProgress;
this.commits = commits;
this.commitTime = commitTime;
- this.commitRate = commitRate;
this.commitRateAverageLatency = commitRateAverageLatency;
this.commitsInProgress = commitsInProgress;
this.documents = documents;
@@ -132,15 +121,6 @@ public class LuceneIndexMetrics {
}
/**
- * 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 in nanoseconds using the Lucene Index
@@ -186,15 +166,6 @@ public class LuceneIndexMetrics {
}
/**
- * 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 in nanoseconds on the Lucene Index
@@ -231,15 +202,6 @@ public class LuceneIndexMetrics {
}
/**
- * 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 in nanoseconds using the Lucene
@@ -277,16 +239,14 @@ public class LuceneIndexMetrics {
return new StringBuilder().append(getClass().getSimpleName()).append("[").append("regionPath=")
.append(this.regionPath).append("; indexName=").append(this.indexName)
.append("; queryExecutions=").append(this.queryExecutions).append("; queryExecutionTime=")
- .append(this.queryExecutionTime).append("; queryRate=").append(this.queryRate)
- .append("; queryRateAverageLatency=").append(this.queryRateAverageLatency)
- .append("; queryExecutionsInProgress=").append(this.queryExecutionsInProgress)
- .append("; queryExecutionTotalHits=").append(this.queryExecutionTotalHits)
- .append("; updates=").append(this.updates).append("; updateTime=").append(this.updateTime)
- .append("; updateRate=").append(this.updateRate).append("; updateRateAverageLatency=")
+ .append(this.queryExecutionTime).append("; queryRateAverageLatency=")
+ .append(this.queryRateAverageLatency).append("; queryExecutionsInProgress=")
+ .append(this.queryExecutionsInProgress).append("; queryExecutionTotalHits=")
+ .append(this.queryExecutionTotalHits).append("; updates=").append(this.updates)
+ .append("; updateTime=").append(this.updateTime).append("; updateRateAverageLatency=")
.append(this.updateRateAverageLatency).append("; updatesInProgress=")
.append(this.updatesInProgress).append("; commits=").append(this.commits)
- .append("; commitTime=").append(this.commitTime).append("; commitRate=")
- .append(this.commitRate).append("; commitRateAverageLatency=")
+ .append("; commitTime=").append(this.commitTime).append("; commitRateAverageLatency=")
.append(this.commitRateAverageLatency).append("; commitsInProgress=")
.append(this.commitsInProgress).append("; documents=").append(this.documents).append("]")
.toString();