use of org.bboxdb.distribution.partitioner.DynamicgridSpacePartitioner in project bboxdb by jnidzwetzki.
the class TestDynamicgridSpacePartitioner method testRootElement.
@Test(timeout = 60000)
public void testRootElement() throws ZookeeperException, ZookeeperNotFoundException, BBoxDBException {
final DynamicgridSpacePartitioner 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.DynamicgridSpacePartitioner in project bboxdb by jnidzwetzki.
the class TestDynamicgridSpacePartitioner method createGridCells.
@Test(timeout = 60000)
public void createGridCells() throws ZookeeperException, ZookeeperNotFoundException, BBoxDBException {
final DynamicgridSpacePartitioner 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(12, regions);
}
Aggregations