dlmarion commented on code in PR #3409:
URL: https://github.com/apache/accumulo/pull/3409#discussion_r1202693907
##########
server/base/src/main/java/org/apache/accumulo/server/manager/state/AbstractTabletStateStore.java:
##########
@@ -108,51 +108,51 @@ public void setFutureLocations(Collection<Assignment>
assignments)
}
@Override
- public void unassign(Collection<TabletLocationState> tablets,
+ public void unassign(Collection<TabletMetadata> tablets,
Map<TServerInstance,List<Path>> logsForDeadServers) throws
DistributedStoreException {
unassign(tablets, logsForDeadServers, -1);
}
@Override
- public void suspend(Collection<TabletLocationState> tablets,
+ public void suspend(Collection<TabletMetadata> tablets,
Map<TServerInstance,List<Path>> logsForDeadServers, long
suspensionTimestamp)
throws DistributedStoreException {
unassign(tablets, logsForDeadServers, suspensionTimestamp);
}
protected abstract void processSuspension(Ample.ConditionalTabletMutator
tabletMutator,
- TabletLocationState tls, long suspensionTimestamp);
+ TabletMetadata tm, long suspensionTimestamp);
- private void unassign(Collection<TabletLocationState> tablets,
+ private void unassign(Collection<TabletMetadata> tablets,
Map<TServerInstance,List<Path>> logsForDeadServers, long
suspensionTimestamp)
throws DistributedStoreException {
try (var tabletsMutator = ample.conditionallyMutateTablets()) {
- for (TabletLocationState tls : tablets) {
- var tabletMutator =
tabletsMutator.mutateTablet(tls.extent).requireAbsentOperation();
+ for (TabletMetadata tm : tablets) {
+ var tabletMutator =
tabletsMutator.mutateTablet(tm.getExtent()).requireAbsentOperation();
- if (tls.hasCurrent()) {
- tabletMutator.requireLocation(tls.current);
+ if (tm.hasCurrent()) {
+ tabletMutator.requireLocation(tm.getLocation());
ManagerMetadataUtil.updateLastForAssignmentMode(context,
tabletMutator,
- tls.current.getServerInstance(), tls.last);
- tabletMutator.deleteLocation(tls.current);
+ tm.getLocation().getServerInstance(), tm.getLast());
+ tabletMutator.deleteLocation(tm.getLocation());
if (logsForDeadServers != null) {
- List<Path> logs =
logsForDeadServers.get(tls.current.getServerInstance());
+ List<Path> logs =
logsForDeadServers.get(tm.getLocation().getServerInstance());
if (logs != null) {
for (Path log : logs) {
- LogEntry entry = new LogEntry(tls.extent, 0, log.toString());
+ LogEntry entry = new LogEntry(tm.getExtent(), 0,
log.toString());
tabletMutator.putWal(entry);
}
}
}
}
- if (tls.hasFuture()) {
- tabletMutator.requireLocation(tls.future);
- tabletMutator.deleteLocation(tls.future);
+ if (tm.getLocation().getType().equals(LocationType.FUTURE)) {
Review Comment:
Addressed in 5f28395
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]