use of org.bboxdb.storage.tuplestore.DiskStorage in project bboxdb by jnidzwetzki.
the class DistributedRecoveryService method runRecoveryForDistributionGroup.
/**
* Run recovery for distribution group
* @param distributionGroupName
* @throws ZookeeperException
*/
protected void runRecoveryForDistributionGroup(final String distributionGroupName) {
try {
final ZookeeperClient zookeeperClient = ZookeeperClientFactory.getZookeeperClient();
final BBoxDBInstance localInstance = ZookeeperClientFactory.getLocalInstanceName();
for (final DiskStorage storage : storageRegistry.getAllStorages()) {
checkGroupVersion(storage, distributionGroupName, zookeeperClient);
}
final SpacePartitioner spacePartitioner = SpacePartitionerCache.getInstance().getSpacePartitionerForGroupName(distributionGroupName);
final DistributionRegion distributionGroup = spacePartitioner.getRootNode();
final List<OutdatedDistributionRegion> outdatedRegions = DistributionRegionHelper.getOutdatedRegions(distributionGroup, localInstance);
handleOutdatedRegions(distributionGroupName, outdatedRegions);
} catch (Throwable e) {
logger.error("Got exception while running recovery for distribution group: " + distributionGroupName, e);
}
}
Aggregations