This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
     new e12e033df1 Mark TabletStatistics.getSplitCreationTime as deprecated 
(#3977)
e12e033df1 is described below

commit e12e033df1721fb8a851017ffe39c8a9a49b7a49
Author: Dave Marion <dlmar...@apache.org>
AuthorDate: Mon Nov 27 08:25:43 2023 -0500

    Mark TabletStatistics.getSplitCreationTime as deprecated (#3977)
---
 .../apache/accumulo/core/manager/balancer/TabletStatisticsImpl.java | 1 +
 .../org/apache/accumulo/core/spi/balancer/SimpleLoadBalancer.java   | 6 ++++--
 .../apache/accumulo/core/spi/balancer/data/TabletStatistics.java    | 1 +
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git 
a/core/src/main/java/org/apache/accumulo/core/manager/balancer/TabletStatisticsImpl.java
 
b/core/src/main/java/org/apache/accumulo/core/manager/balancer/TabletStatisticsImpl.java
index 4795489b3e..c6ff022b36 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/manager/balancer/TabletStatisticsImpl.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/manager/balancer/TabletStatisticsImpl.java
@@ -46,6 +46,7 @@ public class TabletStatisticsImpl implements TabletStatistics 
{
   }
 
   @Override
+  @SuppressWarnings("removal")
   public long getSplitCreationTime() {
     return thriftStats.getSplitCreationTime();
   }
diff --git 
a/core/src/main/java/org/apache/accumulo/core/spi/balancer/SimpleLoadBalancer.java
 
b/core/src/main/java/org/apache/accumulo/core/spi/balancer/SimpleLoadBalancer.java
index 50fcd8417f..2f1b42929e 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/spi/balancer/SimpleLoadBalancer.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/spi/balancer/SimpleLoadBalancer.java
@@ -331,8 +331,10 @@ public class SimpleLoadBalancer implements TabletBalancer {
     TabletId mostRecentlySplit = null;
     long splitTime = 0;
     for (Entry<TabletId,TabletStatistics> entry : extents.entrySet()) {
-      if (entry.getValue().getSplitCreationTime() >= splitTime) {
-        splitTime = entry.getValue().getSplitCreationTime();
+      @SuppressWarnings("removal")
+      long splitCreationTime = entry.getValue().getSplitCreationTime();
+      if (splitCreationTime >= splitTime) {
+        splitTime = splitCreationTime;
         mostRecentlySplit = entry.getKey();
       }
     }
diff --git 
a/core/src/main/java/org/apache/accumulo/core/spi/balancer/data/TabletStatistics.java
 
b/core/src/main/java/org/apache/accumulo/core/spi/balancer/data/TabletStatistics.java
index 99ac7a6251..7e233317f3 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/spi/balancer/data/TabletStatistics.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/spi/balancer/data/TabletStatistics.java
@@ -28,6 +28,7 @@ public interface TabletStatistics extends 
Comparable<TabletStatistics> {
 
   long getNumEntries();
 
+  @Deprecated(since = "3.1", forRemoval = true)
   long getSplitCreationTime();
 
   double getIngestRate();

Reply via email to