accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject [1/2] accumulo git commit: ACCUMULO-3407 keep less information in memory
Date Fri, 12 Dec 2014 20:28:32 GMT
Repository: accumulo
Updated Branches:
  refs/heads/master 8b21fc8a7 -> 14c84e6ad


ACCUMULO-3407 keep less information in memory


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/16f1dbd8
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/16f1dbd8
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/16f1dbd8

Branch: refs/heads/master
Commit: 16f1dbd8829da537a1bbd351523cc016be6fa1fc
Parents: 0cbc8e5
Author: Eric C. Newton <eric.newton@gmail.com>
Authored: Fri Dec 12 15:27:53 2014 -0500
Committer: Eric C. Newton <eric.newton@gmail.com>
Committed: Fri Dec 12 15:27:53 2014 -0500

----------------------------------------------------------------------
 .../main/java/org/apache/accumulo/monitor/Monitor.java    | 10 ++++++++--
 .../org/apache/accumulo/monitor/servlets/ScanServlet.java |  6 ++----
 2 files changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/16f1dbd8/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
index 75d1e9e..64db98f 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
@@ -510,10 +510,16 @@ public class Monitor {
   }
 
   public static class ScanStats {
-    public final List<ActiveScan> scans;
+    public final long scanCount;
+    public final long oldestScan;
     public final long fetched;
     ScanStats(List<ActiveScan> active) {
-      this.scans = active;
+      this.scanCount = active.size();
+      long oldest = -1;
+      for (ActiveScan scan : active) {
+        oldest = Math.max(oldest, scan.age);
+      }
+      this.oldestScan = oldest;
       this.fetched = System.currentTimeMillis();
     }
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/16f1dbd8/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/ScanServlet.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/ScanServlet.java
b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/ScanServlet.java
index f1ada79..d02281a 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/ScanServlet.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/ScanServlet.java
@@ -52,10 +52,8 @@ public class ScanServlet extends BasicServlet {
       long count = 0;
       long oldest = 0;
       if (stats != null) {
-        count = stats.scans.size();
-        for (ActiveScan scan : stats.scans) {
-          oldest = Math.max(scan.age, oldest);
-        }
+        count = stats.scanCount;
+        oldest = stats.oldestScan;
       }
       TableRow row = scanTable.prepareRow();
       row.add(tserverInfo);


Mime
View raw message