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

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


The following commit(s) were added to refs/heads/2.1 by this push:
     new f5f5490b80 Reduce HostRegexTableLoadBalancer RPCs for OOB checks 
(#6446)
f5f5490b80 is described below

commit f5f5490b80b20a971e00340086b0d8363fd0edf7
Author: Dave Marion <[email protected]>
AuthorDate: Fri Jun 26 11:48:40 2026 +0000

    Reduce HostRegexTableLoadBalancer RPCs for OOB checks (#6446)
    
    The StatusThread.updateStatus() method in the Manager calls
    gatherTableInformation to get information about all of the
    TabletServers in the cluster, then calls balanceTablets().
    
    balanceTablets() creates a partitioned view of the status
    information and uses that when creating the BalanceParams
    to pass to table balancer's balance().
    
    The HostRegexTableLoadBalancer.balance method will periodically
    check for tablets that are hosted outside of the defined
    regex. Prior to this change it was making an RPC call to
    every tablet server outside of the defined regex.
    
    This change uses the gathered tablet server information
    such that the RPC call is made to the tablet server if
    the information indicates that the tablet server is
    hosting tablets for the table. The RPC is necessary
    to get the extent information to create the migrations,
    but it's only necessary when the tablet server is
    hosting tablets for the table.
---
 .../accumulo/core/spi/balancer/HostRegexTableLoadBalancer.java    | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git 
a/core/src/main/java/org/apache/accumulo/core/spi/balancer/HostRegexTableLoadBalancer.java
 
b/core/src/main/java/org/apache/accumulo/core/spi/balancer/HostRegexTableLoadBalancer.java
index 49309dc352..5a0c021d1a 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/spi/balancer/HostRegexTableLoadBalancer.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/spi/balancer/HostRegexTableLoadBalancer.java
@@ -421,6 +421,14 @@ public class HostRegexTableLoadBalancer extends 
TableLoadBalancer {
                   + " it may have been deleted or renamed.", table);
               continue;
             }
+            // If current information in the Manager indicates that the tserver
+            // is not hosting tablets for the table, then move on to the next
+            // tserver
+            if (e.getValue().getTableMap() != null
+                && !e.getValue().getTableMap().containsKey(tid.canonical())) {
+              LOG.debug("TServer {} is not hosting any tablets for table {}", 
e.getKey(), table);
+              continue;
+            }
             try {
               List<TabletStatistics> outOfBoundsTablets = 
getOnlineTabletsForTable(e.getKey(), tid);
               if (outOfBoundsTablets == null) {

Reply via email to