use of org.apache.accumulo.tserver.session.Session in project accumulo by apache.
the class TabletServer method markUnusedWALs.
private void markUnusedWALs() {
List<DfsLogger> closedCopy;
synchronized (closedLogs) {
closedCopy = copyClosedLogs(closedLogs);
}
ReferencedRemover refRemover = candidates -> {
for (Tablet tablet : getOnlineTablets().values()) {
tablet.removeInUseLogs(candidates);
if (candidates.isEmpty()) {
break;
}
}
};
Set<DfsLogger> eligible = findOldestUnreferencedWals(closedCopy, refRemover);
try {
TServerInstance session = this.getTabletSession();
for (DfsLogger candidate : eligible) {
log.info("Marking " + candidate.getPath() + " as unreferenced");
walMarker.walUnreferenced(session, candidate.getPath());
}
synchronized (closedLogs) {
closedLogs.removeAll(eligible);
}
} catch (WalMarkerException ex) {
log.info(ex.toString(), ex);
}
}
Aggregations