Search in sources :

Example 21 with TupleStoreManagerRegistry

use of org.bboxdb.storage.tuplestore.manager.TupleStoreManagerRegistry in project bboxdb by jnidzwetzki.

the class SSTableServiceRunnable method testForUnderflow.

/**
 * Test for region underflow
 *
 * @param spacePartitioner
 * @param regionToMerge
 * @throws BBoxDBException
 */
private void testForUnderflow(final SpacePartitioner spacePartitioner, final DistributionRegion oneSourceNode) throws BBoxDBException {
    final List<List<DistributionRegion>> candidates = spacePartitioner.getMergeCandidates(oneSourceNode);
    for (final List<DistributionRegion> sources : candidates) {
        if (RegionMergeHelper.isRegionUnderflow(sources)) {
            final TupleStoreManagerRegistry tupleStoreManagerRegistry = storage.getTupleStoreManagerRegistry();
            final RegionMerger regionMerger = new RegionMerger(tupleStoreManagerRegistry);
            regionMerger.mergeRegion(sources, spacePartitioner, tupleStoreManagerRegistry);
            return;
        }
    }
}
Also used : DistributionRegion(org.bboxdb.distribution.region.DistributionRegion) TupleStoreManagerRegistry(org.bboxdb.storage.tuplestore.manager.TupleStoreManagerRegistry) RegionMerger(org.bboxdb.distribution.partitioner.regionsplit.RegionMerger) ArrayList(java.util.ArrayList) List(java.util.List)

Aggregations

TupleStoreManagerRegistry (org.bboxdb.storage.tuplestore.manager.TupleStoreManagerRegistry)21 TupleStoreName (org.bboxdb.storage.entity.TupleStoreName)10 BeforeClass (org.junit.BeforeClass)5 StorageManagerException (org.bboxdb.storage.StorageManagerException)4 ArrayList (java.util.ArrayList)3 ZookeeperException (org.bboxdb.distribution.zookeeper.ZookeeperException)3 TupleStoreManager (org.bboxdb.storage.tuplestore.manager.TupleStoreManager)3 SpacePartitioner (org.bboxdb.distribution.partitioner.SpacePartitioner)2 DistributionRegion (org.bboxdb.distribution.region.DistributionRegion)2 TupleStoreAdapter (org.bboxdb.distribution.zookeeper.TupleStoreAdapter)2 BBoxDBException (org.bboxdb.misc.BBoxDBException)2 Tuple (org.bboxdb.storage.entity.Tuple)2 File (java.io.File)1 List (java.util.List)1 DistributedRecoveryService (org.bboxdb.distribution.DistributedRecoveryService)1 TupleStoreFlushZookeeperAdapter (org.bboxdb.distribution.TupleStoreFlushZookeeperAdapter)1 MembershipConnectionService (org.bboxdb.distribution.membership.MembershipConnectionService)1 KDtreeSpacePartitioner (org.bboxdb.distribution.partitioner.KDtreeSpacePartitioner)1 RegionMerger (org.bboxdb.distribution.partitioner.regionsplit.RegionMerger)1 RegionSplitter (org.bboxdb.distribution.partitioner.regionsplit.RegionSplitter)1