cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r803240 - in /incubator/cassandra/trunk/src/java/org/apache/cassandra: db/ColumnFamilyStore.java db/ColumnFamilyStoreMBean.java tools/NodeProbe.java
Date Tue, 11 Aug 2009 18:27:20 GMT
Author: jbellis
Date: Tue Aug 11 18:27:20 2009
New Revision: 803240

URL: http://svn.apache.org/viewvc?rev=803240&view=rev
Log:
add back read latency stats for CFS.getColumnFamily.  patch by Sammy Yu; reviewed by jbellis
for CASSANDRA-359

Modified:
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/tools/NodeProbe.java

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java?rev=803240&r1=803239&r2=803240&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java Tue
Aug 11 18:27:20 2009
@@ -90,7 +90,6 @@
     private ReentrantReadWriteLock sstableLock_ = new ReentrantReadWriteLock(true);
 
     private TimedStatsDeque readStats_ = new TimedStatsDeque(60000);
-    private TimedStatsDeque diskReadStats_ = new TimedStatsDeque(60000);
     private TimedStatsDeque writeStats_ = new TimedStatsDeque(60000);
 
     ColumnFamilyStore(String table, String columnFamilyName, boolean isSuper, int indexValue)
throws IOException
@@ -1346,11 +1345,6 @@
         return readStats_.size();
     }
 
-    public int getReadDiskHits()
-    {
-        return diskReadStats_.size();
-    }
-
     public double getReadLatency()
     {
         return readStats_.mean();
@@ -1394,6 +1388,8 @@
     {
         assert columnFamily_.equals(filter.getColumnFamilyName());
 
+        long start = System.currentTimeMillis();
+
         // if we are querying subcolumns of a supercolumn, fetch the supercolumn with NQF,
then filter in-memory.
         if (filter.path.superColumnName != null)
         {
@@ -1407,6 +1403,7 @@
             SuperColumn scFiltered = filter.filterSuperColumn(sc, gcBefore);
             ColumnFamily cfFiltered = cf.cloneMeShallow();
             cfFiltered.addColumn(scFiltered);
+            readStats_.add(System.currentTimeMillis() - start);
             return cfFiltered;
         }
 
@@ -1476,6 +1473,7 @@
                 }
             }
 
+            readStats_.add(System.currentTimeMillis() - start);
             sstableLock_.readLock().unlock();
         }
     }

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java?rev=803240&r1=803239&r2=803240&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
(original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
Tue Aug 11 18:27:20 2009
@@ -65,11 +65,6 @@
     public int getReadCount();
 
     /**
-     * @return the number of read operations on this column family that hit the disk in the
last minute
-     */
-    public int getReadDiskHits();
-
-    /**
      * @return average latency per read operation in the last minute
      */
     public double getReadLatency();

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/tools/NodeProbe.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/tools/NodeProbe.java?rev=803240&r1=803239&r2=803240&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/tools/NodeProbe.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/tools/NodeProbe.java Tue Aug 11
18:27:20 2009
@@ -372,7 +372,6 @@
                     outs.println("\t\tMemtable Data Size: " + cfstore.getMemtableDataSize());
                     outs.println("\t\tMemtable Switch Count: " + cfstore.getMemtableSwitchCount());
                     outs.println("\t\tRead Count: " + cfstore.getReadCount());
-                    outs.println("\t\tRead Disk Count: " + cfstore.getReadDiskHits());
                     outs.println("\t\tRead Latency: " + String.format("%01.3f", cfstore.getReadLatency())
+ " ms.");
                     outs.println("\t\tWrite Count: " + cfstore.getWriteCount());
                     outs.println("\t\tWrite Latency: " + String.format("%01.3f", cfstore.getWriteLatency())
+ " ms.");



Mime
View raw message