You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by nn...@apache.org on 2017/03/10 22:00:58 UTC

geode git commit: GEODE-2620: Rate stats removed from LuceneIndexMetrics

Repository: geode
Updated Branches:
  refs/heads/develop f69d86c98 -> 0f48fa3f7


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/0f48fa3f
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/0f48fa3f
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/0f48fa3f

Branch: refs/heads/develop
Commit: 0f48fa3f7117064601a68975e04571ab804684c6
Parents: f69d86c
Author: nabarun <nn...@pivotal.io>
Authored: Tue Mar 7 15:05:47 2017 -0800
Committer: nabarun <nn...@pivotal.io>
Committed: Fri Mar 10 13:58:49 2017 -0800

----------------------------------------------------------------------
 .../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/0f48fa3f/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/0f48fa3f/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();