queueAdmin.upgrade();
}
private void upgradeSystemDatasets(Injector injector) throws Exception {
// Setting up all system datasets to be upgraded, collecting them from respective components
DatasetFramework framework = createRegisteredDatasetFramework(injector);
// dataset service
DatasetMetaTableUtil.setupDatasets(framework);
// app metadata
DefaultStore.setupDatasets(framework);
// logs metadata
LogSaverTableUtil.setupDatasets(framework);
// scheduler metadata
ScheduleStoreTableUtil.setupDatasets(framework);
// Upgrade all datasets
for (DatasetSpecification spec : framework.getInstances()) {
System.out.println(String.format("Upgrading dataset: %s, spec: %s", spec.getName(), spec.toString()));
DatasetAdmin admin = framework.getAdmin(spec.getName(), null);
// we know admin is not null, since we are looping over existing datasets
admin.upgrade();
System.out.println(String.format("Upgraded dataset: %s", spec.getName()));
}
}