accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject svn commit: r1332426 - in /accumulo/trunk: core/src/main/java/org/apache/accumulo/core/iterators/system/ server/src/main/java/org/apache/accumulo/server/tabletserver/
Date Mon, 30 Apr 2012 21:54:59 GMT
Author: kturner
Date: Mon Apr 30 21:54:59 2012
New Revision: 1332426

URL: http://svn.apache.org/viewvc?rev=1332426&view=rev
Log:
ACCUMULO-517 Fixed some bugs w/ new seek count

Modified:
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/iterators/system/StatsIterator.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/iterators/system/StatsIterator.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/iterators/system/StatsIterator.java?rev=1332426&r1=1332425&r2=1332426&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/iterators/system/StatsIterator.java
(original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/iterators/system/StatsIterator.java
Mon Apr 30 21:54:59 2012
@@ -63,10 +63,8 @@ public class StatsIterator extends Wrapp
   public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive)
throws IOException {
     super.seek(range, columnFamilies, inclusive);
     seekCounter.incrementAndGet();
-    if (super.hasTop())
-      numRead = 1;
-    else
-      numRead = 0;
+    readCounter.addAndGet(numRead);
+    numRead = 0;
   }
   
   public void report() {

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java?rev=1332426&r1=1332425&r2=1332426&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
Mon Apr 30 21:54:59 2012
@@ -432,7 +432,7 @@ public class Tablet {
   private volatile long numEntries;
   private volatile long numEntriesInMemory;
   
-  private AtomicLong seekCount = new AtomicLong(0);
+
   // a count of the amount of data read by the iterators
   private AtomicLong scannedCount = new AtomicLong(0);
   private Rate scannedRate = new Rate(0.2);
@@ -2066,7 +2066,7 @@ public class Tablet {
       
       TabletIteratorEnvironment iterEnv = new TabletIteratorEnvironment(IteratorScope.scan,
acuTableConf, fileManager, files);
       
-      statsIterator = new StatsIterator(multiIter, seekCount, scannedCount);
+      statsIterator = new StatsIterator(multiIter, TabletServer.seekCount, scannedCount);
       
       DeletingIterator delIter = new DeletingIterator(statsIterator, false);
       
@@ -3359,10 +3359,6 @@ public class Tablet {
     
     this.numEntries = numEntries;
   }
-  
-  public long getNumSeeks() {
-    return seekCount.get();
-  }
 
   public long getNumEntries() {
     return numEntries;

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java?rev=1332426&r1=1332425&r2=1332426&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
Mon Apr 30 21:54:59 2012
@@ -2507,6 +2507,8 @@ public class TabletServer extends Abstra
   
   private static ObjectName OBJECT_NAME = null;
   
+  static AtomicLong seekCount = new AtomicLong(0);
+
   public TabletStatsKeeper getStatsKeeper() {
     return statsKeeper;
   }
@@ -3008,8 +3010,6 @@ public class TabletServer extends Abstra
       onlineTabletsCopy = new HashMap<KeyExtent,Tablet>(this.onlineTablets);
     }
     Map<String,TableInfo> tables = new HashMap<String,TableInfo>();
-    
-    long seeks = 0;
 
     for (Entry<KeyExtent,Tablet> entry : onlineTabletsCopy.entrySet()) {
       String tableId = entry.getKey().getTableId().toString();
@@ -3040,7 +3040,6 @@ public class TabletServer extends Abstra
         table.major.running++;
       if (tablet.majorCompactionQueued())
         table.major.queued++;
-      seeks += tablet.getNumSeeks();
     }
     
     for (Entry<String,MapCounter<ScanRunState>> entry : scanCounts.entrySet())
{
@@ -3080,7 +3079,7 @@ public class TabletServer extends Abstra
     result.osLoad = ManagementFactory.getOperatingSystemMXBean().getSystemLoadAverage();
     result.name = getClientAddressString();
     result.holdTime = resourceManager.holdTime();
-    result.lookups = seeks;
+    result.lookups = seekCount.get();
     result.loggers = new HashSet<String>();
     result.indexCacheHits = resourceManager.getIndexCache().getStats().getHitCount();
     result.indexCacheRequest = resourceManager.getIndexCache().getStats().getRequestCount();



Mime
View raw message