use of org.bboxdb.distribution.partitioner.StaticgridSpacePartitioner in project bboxdb by jnidzwetzki.
the class TestStaticgridSpacePartitioner method testRootElement.
@Test(timeout = 60000)
public void testRootElement() throws ZookeeperException, ZookeeperNotFoundException, BBoxDBException {
final StaticgridSpacePartitioner spacePartitioner = getSpacePartitioner();
final DistributionRegion rootElement = spacePartitioner.getRootNode();
Assert.assertEquals(rootElement.getState(), DistributionRegionState.SPLIT);
final BoundingBox box = rootElement.getConveringBox();
Assert.assertEquals(new BoundingBox(0.0, 5.0, 0.0, 6.0), box);
}
use of org.bboxdb.distribution.partitioner.StaticgridSpacePartitioner in project bboxdb by jnidzwetzki.
the class TestStaticgridSpacePartitioner method createGridCells.
@Test(timeout = 60000)
public void createGridCells() throws ZookeeperException, ZookeeperNotFoundException, BBoxDBException {
final StaticgridSpacePartitioner spacePartitioner = getSpacePartitioner();
final DistributionRegion rootElement = spacePartitioner.getRootNode();
final long regions = rootElement.getThisAndChildRegions().stream().map(r -> r.getState()).filter(DistributionRegionHelper.PREDICATE_REGIONS_FOR_WRITE).count();
Assert.assertEquals(120, regions);
}
use of org.bboxdb.distribution.partitioner.StaticgridSpacePartitioner in project bboxdb by jnidzwetzki.
the class TestStaticgridSpacePartitioner2 method testMergeFailed.
/**
* Test the merge failed call
* @throws BBoxDBException
* @throws ZookeeperNotFoundException
* @throws ZookeeperException
*/
@Test(expected = BBoxDBException.class)
public void testMergeFailed() throws BBoxDBException, ZookeeperException, ZookeeperNotFoundException {
final StaticgridSpacePartitioner spacePartitioner = getSpacePartitioner();
spacePartitioner.mergeFailed(null, null);
}
use of org.bboxdb.distribution.partitioner.StaticgridSpacePartitioner in project bboxdb by jnidzwetzki.
the class TestStaticgridSpacePartitioner2 method testIsSplittable.
/**
* Test the is splittable call
* @throws ZookeeperNotFoundException
* @throws ZookeeperException
*/
@Test(timeout = 60000)
public void testIsSplittable() throws ZookeeperException, ZookeeperNotFoundException {
final StaticgridSpacePartitioner spacePartitioner = getSpacePartitioner();
Assert.assertFalse(spacePartitioner.isSplitable(null));
}
use of org.bboxdb.distribution.partitioner.StaticgridSpacePartitioner in project bboxdb by jnidzwetzki.
the class TestStaticgridSpacePartitioner2 method testGetMergeCandidates.
/**
* Get the merge candidates
*/
@Test(timeout = 60000)
public void testGetMergeCandidates() throws ZookeeperException, ZookeeperNotFoundException {
final StaticgridSpacePartitioner spacePartitioner = getSpacePartitioner();
Assert.assertTrue(spacePartitioner.getMergeCandidates(null).isEmpty());
}
Aggregations