accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject svn commit: r1332355 - in /accumulo/branches/1.4: ./ src/ src/core/ src/server/ src/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
Date Mon, 30 Apr 2012 19:32:48 GMT
Author: kturner
Date: Mon Apr 30 19:32:47 2012
New Revision: 1332355

URL: http://svn.apache.org/viewvc?rev=1332355&view=rev
Log:
ACCUMULO-561 update bytes scanned stats for batch scans (merged from trunk)

Modified:
    accumulo/branches/1.4/   (props changed)
    accumulo/branches/1.4/src/   (props changed)
    accumulo/branches/1.4/src/core/   (props changed)
    accumulo/branches/1.4/src/server/   (props changed)
    accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java

Propchange: accumulo/branches/1.4/
------------------------------------------------------------------------------
  Merged /accumulo/trunk:r1332347

Propchange: accumulo/branches/1.4/src/
------------------------------------------------------------------------------
  Merged /accumulo/trunk/src:r1332347
  Merged /accumulo/trunk:r1332347

Propchange: accumulo/branches/1.4/src/core/
------------------------------------------------------------------------------
  Merged /accumulo/trunk/src/core:r1332347
  Merged /accumulo/trunk/core:r1332347

Propchange: accumulo/branches/1.4/src/server/
------------------------------------------------------------------------------
  Merged /accumulo/trunk/src/server:r1332347
  Merged /accumulo/trunk/server:r1332347

Modified: accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java?rev=1332355&r1=1332354&r2=1332355&view=diff
==============================================================================
--- accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
(original)
+++ accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
Mon Apr 30 19:32:47 2012
@@ -1609,6 +1609,7 @@ public class Tablet {
           results.add(kve);
           entriesAdded++;
           lookupResult.bytesAdded += kve.estimateMemoryUsed();
+          lookupResult.dataSize += kve.numBytes();
           
           exceededMemoryUsage = lookupResult.bytesAdded > maxResultsSize;
           
@@ -1677,6 +1678,7 @@ public class Tablet {
   class LookupResult {
     List<Range> unfinishedRanges = new ArrayList<Range>();
     long bytesAdded = 0;
+    long dataSize = 0;
     boolean closed = false;
   }
   
@@ -1699,9 +1701,12 @@ public class Tablet {
     
     ScanDataSource dataSource = new ScanDataSource(authorizations, this.defaultSecurityLabel,
columns, ssiList, ssio, interruptFlag);
     
+    LookupResult result = null;
+
     try {
       SortedKeyValueIterator<Key,Value> iter = new SourceSwitchingIterator(dataSource);
-      return lookup(iter, ranges, columns, results, maxResultSize);
+      result = lookup(iter, ranges, columns, results, maxResultSize);
+      return result;
     } catch (IOException ioe) {
       dataSource.close(true);
       throw ioe;
@@ -1712,6 +1717,8 @@ public class Tablet {
       
       synchronized (this) {
         queryCount += results.size();
+        if (result != null)
+          queryBytes += result.dataSize;
       }
     }
   }



Mime
View raw message