accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject [accumulo] 01/01: Merge branch '1.9' into 2.0
Date Fri, 26 Jul 2019 19:21:58 GMT
This is an automated email from the ASF dual-hosted git repository.

kturner pushed a commit to branch 2.0
in repository https://gitbox.apache.org/repos/asf/accumulo.git

commit 0bb3f896a28ec315976fb4570ced8e3913a75587
Merge: 129e8ec 6546fc3
Author: Keith Turner <kturner@apache.org>
AuthorDate: Fri Jul 26 15:20:31 2019 -0400

    Merge branch '1.9' into 2.0

 .../apache/accumulo/tserver/BusiestTracker.java    |  8 ++++--
 .../accumulo/tserver/BusiestTrackerTest.java       | 32 ++++++++++++++++------
 2 files changed, 29 insertions(+), 11 deletions(-)

diff --cc server/tserver/src/main/java/org/apache/accumulo/tserver/BusiestTracker.java
index 1eaa1d6,229ed74..cf19b5a
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/BusiestTracker.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/BusiestTracker.java
@@@ -60,9 -60,16 +60,13 @@@ public abstract class BusiestTracker 
  
        counts.put(extent, count);
  
-       long delta = count - lastCounts.getOrDefault(extent, 0L);
 -      Long lastCount = lastCounts.get(extent);
++      long lastCount = lastCounts.getOrDefault(extent, 0L);
  
-       // handle case where tablet leaves tserver and returns OR tablet had no activity
 -      // if a tablet leaves a tserver and come back, then its count will be reset. This
could make
++      // if a tablet leaves a tserver and comes back, then its count will be reset. This
could make
+       // lastCount higher than the current count. That is why lastCount > count is checked
below.
 -      if (lastCount == null || lastCount > count)
 -        lastCount = 0L;
 -
 -      long delta = count - lastCount;
++      long delta = (lastCount > count) ? count : count - lastCount;
+ 
+       // handle case where tablet had no activity
        if (delta > 0)
          tabletsWithDelta.add(new ComparablePair<>(delta, extent));
      }


Mime
View raw message