You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by kt...@apache.org on 2023/07/05 19:49:52 UTC

[accumulo] branch elasticity updated: fixes bug in tablet mgmt scanner (#3566)

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

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


The following commit(s) were added to refs/heads/elasticity by this push:
     new 21c2e4479c fixes bug in tablet mgmt scanner (#3566)
21c2e4479c is described below

commit 21c2e4479cf24bcb94930a404d1ad84fd2e0ce46
Author: Keith Turner <kt...@apache.org>
AuthorDate: Wed Jul 5 15:49:46 2023 -0400

    fixes bug in tablet mgmt scanner (#3566)
---
 .../accumulo/server/manager/state/TabletManagementScanner.java      | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/server/base/src/main/java/org/apache/accumulo/server/manager/state/TabletManagementScanner.java b/server/base/src/main/java/org/apache/accumulo/server/manager/state/TabletManagementScanner.java
index 63e9cd6cd0..bbd97fe6bf 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/manager/state/TabletManagementScanner.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/manager/state/TabletManagementScanner.java
@@ -69,9 +69,9 @@ public class TabletManagementScanner implements ClosableIterator<TabletManagemen
         final TableId tid = context.getTableId(tableName);
         final ClientTabletCache locator = ClientTabletCache.getInstance(context, tid);
         final Set<String> locations = new HashSet<>();
-        final List<Range> failures = locator.findTablets(context, ALL_TABLETS_RANGE, (ct, r) -> {
-          locations.add(ct.getTserverLocation().orElseThrow());
-        }, LocationNeed.NOT_REQUIRED);
+        final List<Range> failures = locator.findTablets(context, ALL_TABLETS_RANGE,
+            (ct, r) -> ct.getTserverLocation().ifPresent(locations::add),
+            LocationNeed.NOT_REQUIRED);
         // If failures is not empty, then there are tablets that we don't know the location of.
         // In this case, add an extra thread.
         numLocations = (failures.isEmpty()) ? locations.size() : locations.size() + 1;