Skip to content

Attempt to use TabletManagementIterator for root tablet #3587

@keith-turner

Description

@keith-turner

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

Status
✅ Done

Relationships

None yet

Development

No branches or pull requests

Issue actions