for (DatasetSpecification spec : dsFramework.getInstances()) {
String dsName = spec.getName();
// See if it is timeseries or aggregates table
if (dsName.contains(metricsPrefix + ".ts.") || dsName.contains(metricsPrefix + ".agg")) {
DatasetAdmin admin = dsFramework.getAdmin(dsName, null);
if (admin != null) {
admin.upgrade();
} else {
LOG.error("Could not obtain admin to upgrade metrics table: " + dsName);
// continue to best effort
}
}