This is an automated email from the ASF dual-hosted git repository. dlmarion 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 75b717ed5f Resolved elasticity TODOs in Manager (#4365) 75b717ed5f is described below commit 75b717ed5f0a7604d6cc25f0ce2a069d9335907b Author: Dave Marion <dlmar...@apache.org> AuthorDate: Wed Mar 13 08:28:15 2024 -0400 Resolved elasticity TODOs in Manager (#4365) Removed the TODO for the bulkImports as it is still being set by BulkImport V2 and referenced in the Monitor. Implemented the suggestion in the other TODO. Co-authored-by: Keith Turner <ktur...@apache.org> --- .../src/main/java/org/apache/accumulo/manager/Manager.java | 11 ++++------- .../java/org/apache/accumulo/manager/TabletGroupWatcher.java | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/server/manager/src/main/java/org/apache/accumulo/manager/Manager.java b/server/manager/src/main/java/org/apache/accumulo/manager/Manager.java index 6758acfc1f..45ab2b5e2b 100644 --- a/server/manager/src/main/java/org/apache/accumulo/manager/Manager.java +++ b/server/manager/src/main/java/org/apache/accumulo/manager/Manager.java @@ -53,6 +53,7 @@ import java.util.concurrent.ScheduledFuture; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; +import java.util.function.Predicate; import java.util.stream.Collectors; import org.apache.accumulo.core.Constants; @@ -226,7 +227,6 @@ public class Manager extends AbstractServer volatile SortedMap<TabletServerId,TServerStatus> tserverStatusForBalancer = emptySortedMap(); volatile Map<String,Set<TServerInstance>> tServerGroupingForBalancer = emptyMap(); - // ELASTICITY_TODO is this still needed? final ServerBulkImportStatus bulkImportStatus = new ServerBulkImportStatus(); private final AtomicBoolean managerInitialized = new AtomicBoolean(false); @@ -243,14 +243,11 @@ public class Manager extends AbstractServer return state; } - // ELASTICITIY_TODO it would be nice if this method could take DataLevel as an argument and only - // retrieve information about compactions in that data level. Attempted this and a lot of - // refactoring was needed to get that small bit of information to this method. Would be best to - // address this after issue. May be best to attempt this after #3576. - public Map<FateId,Map<String,String>> getCompactionHints() { + public Map<FateId,Map<String,String>> getCompactionHints(DataLevel level) { + Predicate<TableId> tablePredicate = (tableId) -> DataLevel.of(tableId) == level; Map<FateId,CompactionConfig> allConfig; try { - allConfig = CompactionConfigStorage.getAllConfig(getContext(), tableId -> true); + allConfig = CompactionConfigStorage.getAllConfig(getContext(), tablePredicate); } catch (InterruptedException | KeeperException e) { throw new RuntimeException(e); } diff --git a/server/manager/src/main/java/org/apache/accumulo/manager/TabletGroupWatcher.java b/server/manager/src/main/java/org/apache/accumulo/manager/TabletGroupWatcher.java index e7ea20413a..bd177c2deb 100644 --- a/server/manager/src/main/java/org/apache/accumulo/manager/TabletGroupWatcher.java +++ b/server/manager/src/main/java/org/apache/accumulo/manager/TabletGroupWatcher.java @@ -340,7 +340,7 @@ abstract class TabletGroupWatcher extends AccumuloDaemonThread { return new TabletManagementParameters(manager.getManagerState(), parentLevelUpgrade, manager.onlineTables(), tServersSnapshot, shutdownServers, manager.migrationsSnapshot(), - store.getLevel(), manager.getCompactionHints(), canSuspendTablets(), + store.getLevel(), manager.getCompactionHints(store.getLevel()), canSuspendTablets(), lookForTabletsNeedingVolReplacement ? manager.getContext().getVolumeReplacements() : Map.of()); }