use of io.datarouter.nodewatch.storage.latesttablecount.LatestTableCountKey in project datarouter by hotpads.
the class TableCountHandler method deleteAllMetadata.
@Handler
private Mav deleteAllMetadata(String clientName, String tableName) {
// delete rows from TableCount
var tableCountKeyPrefix = new TableCountKey(clientName, tableName, null);
tableCountDao.deleteWithPrefix(tableCountKeyPrefix);
// delete rows from TableSample
var tableSampleKeyPrefix = new TableSampleKey(clientName, tableName, null, null);
tableSampleDao.deleteWithPrefix(tableSampleKeyPrefix);
// delete from LatestTableCount
var latestTableCountKey = new LatestTableCountKey(clientName, tableName);
latestTableCountDao.delete(latestTableCountKey);
var dto = new DatarouterChangelogDtoBuilder("Nodewatch", clientName + "." + tableName, "deleted metadata", getSessionInfo().getNonEmptyUsernameOrElse("")).build();
changelogRecorder.record(dto);
return new InContextRedirectMav(request, paths.datarouter.nodewatch.tableCount.toSlashedString());
}
Aggregations