Search in sources :

Example 31 with TupleStoreManager

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

the class RegionSplitter method stopFlushToDisk.

/**
 * Stop the to disk flushing
 * @param ssTableName
 * @throws StorageManagerException
 */
private void stopFlushToDisk(final TupleStoreName ssTableName) throws StorageManagerException {
    final TupleStoreManager ssTableManager = registry.getTupleStoreManager(ssTableName);
    // Stop flush thread, so new data remains in memory
    ssTableManager.setToReadOnly();
}
Also used : TupleStoreManager(org.bboxdb.storage.tuplestore.manager.TupleStoreManager)

Example 32 with TupleStoreManager

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

the class SamplingHelper method getSamples.

/**
 * Get the samples
 *
 * @param boundingBox
 * @param splitDimension
 * @param tables
 * @return
 * @throws StorageManagerException
 */
private static List<BoundingBox> getSamples(final BoundingBox boundingBox, final TupleStoreManagerRegistry tupleStoreManagerRegistry, final List<TupleStoreName> tables) throws StorageManagerException {
    final List<BoundingBox> allPointSamples = new ArrayList<>();
    for (final TupleStoreName ssTableName : tables) {
        logger.info("Create split samples for table: {} ", ssTableName.getFullname());
        final TupleStoreManager sstableManager = tupleStoreManagerRegistry.getTupleStoreManager(ssTableName);
        final List<ReadOnlyTupleStore> tupleStores = sstableManager.getAllTupleStorages();
        final List<BoundingBox> pointSamples = processTupleStores(tupleStores);
        allPointSamples.addAll(pointSamples);
        logger.info("Create split samples for table: {} DONE. Got {} samples.", ssTableName.getFullname(), pointSamples.size());
    }
    return allPointSamples;
}
Also used : BoundingBox(org.bboxdb.commons.math.BoundingBox) ArrayList(java.util.ArrayList) TupleStoreName(org.bboxdb.storage.entity.TupleStoreName) ReadOnlyTupleStore(org.bboxdb.storage.tuplestore.ReadOnlyTupleStore) TupleStoreManager(org.bboxdb.storage.tuplestore.manager.TupleStoreManager)

Aggregations

TupleStoreManager (org.bboxdb.storage.tuplestore.manager.TupleStoreManager)32 Tuple (org.bboxdb.storage.entity.Tuple)17 TupleStoreName (org.bboxdb.storage.entity.TupleStoreName)17 Test (org.junit.Test)12 TupleStoreConfiguration (org.bboxdb.storage.entity.TupleStoreConfiguration)11 BoundingBox (org.bboxdb.commons.math.BoundingBox)10 BBoxDBException (org.bboxdb.misc.BBoxDBException)10 JoinedTuple (org.bboxdb.storage.entity.JoinedTuple)10 TupleStoreManagerRegistry (org.bboxdb.storage.tuplestore.manager.TupleStoreManagerRegistry)9 StorageManagerException (org.bboxdb.storage.StorageManagerException)8 IndexedSpatialJoinOperator (org.bboxdb.storage.queryprocessor.operator.IndexedSpatialJoinOperator)8 SpatialIndexReadOperator (org.bboxdb.storage.queryprocessor.operator.SpatialIndexReadOperator)8 ArrayList (java.util.ArrayList)7 List (java.util.List)6 RejectedException (org.bboxdb.commons.RejectedException)6 Lists (com.google.common.collect.Lists)5 Iterator (java.util.Iterator)5 Collectors (java.util.stream.Collectors)5 AfterClass (org.junit.AfterClass)5 IOException (java.io.IOException)4