The root tablet does not use the TabletManagementIterator to make decisions about the root tablet for the TabletGroupWatcher. Its specialized code is here :
|
finished = true; |
|
TabletMetadata tm = ample.readTablet(RootTable.EXTENT, ReadConsistency.EVENTUAL); |
|
|
|
var actions = EnumSet.of(ManagementAction.NEEDS_LOCATION_UPDATE); |
|
|
|
CompactionJobGenerator cjg = new CompactionJobGenerator(new ServiceEnvironmentImpl(ctx)); |
|
var jobs = cjg.generateJobs(tm, |
|
EnumSet.of(CompactionKind.SYSTEM, CompactionKind.USER, CompactionKind.SELECTOR)); |
|
if (!jobs.isEmpty()) { |
|
actions.add(ManagementAction.NEEDS_COMPACTING); |
|
} |
|
|
|
return new TabletManagement(actions, tm); |
Adapting this to use TabletManagementIterator in some way would be nice as it would make the root tablets behavior less specialized and more likely to behave like the rest of accumulo. May be able to use code similar to the following
|
var iter = new ColumnFamilySkippingIterator(new SortedMapIterator(rtm.toKeyValues())); |
to obtain an Accumulo iterator over the root tablet metadata that could be the source iterator for TabletManagementIterator.
The root tablet does not use the TabletManagementIterator to make decisions about the root tablet for the TabletGroupWatcher. Its specialized code is here :
accumulo/server/base/src/main/java/org/apache/accumulo/server/manager/state/ZooTabletStateStore.java
Lines 74 to 86 in 406552e
Adapting this to use TabletManagementIterator in some way would be nice as it would make the root tablets behavior less specialized and more likely to behave like the rest of accumulo. May be able to use code similar to the following
accumulo/server/base/src/main/java/org/apache/accumulo/server/metadata/RootConditionalWriter.java
Line 104 in 406552e
to obtain an Accumulo iterator over the root tablet metadata that could be the source iterator for TabletManagementIterator.