use of org.locationtech.geowave.datastore.rocksdb.util.RocksDBDataIndexTable in project geowave by locationtech.
the class RocksDBOperations method deleteRowsFromDataIndex.
public void deleteRowsFromDataIndex(final byte[][] dataIds, final short adapterId, final String typeName) {
final RocksDBDataIndexTable table = RocksDBUtils.getDataIndexTable(getClient(), typeName, adapterId);
Arrays.stream(dataIds).forEach(d -> table.delete(d));
table.flush();
}
use of org.locationtech.geowave.datastore.rocksdb.util.RocksDBDataIndexTable in project geowave by locationtech.
the class RocksDBReader method createIteratorForDataIndexReader.
private Iterator<GeoWaveRow> createIteratorForDataIndexReader(final RocksDBClient client, final DataIndexReaderParams dataIndexReaderParams) {
final RocksDBDataIndexTable dataIndexTable = RocksDBUtils.getDataIndexTable(client, dataIndexReaderParams.getInternalAdapterStore().getTypeName(dataIndexReaderParams.getAdapterId()), dataIndexReaderParams.getAdapterId());
Iterator<GeoWaveRow> iterator;
if (dataIndexReaderParams.getDataIds() != null) {
iterator = dataIndexTable.dataIndexIterator(dataIndexReaderParams.getDataIds());
} else {
iterator = dataIndexTable.dataIndexIterator(dataIndexReaderParams.getStartInclusiveDataId(), dataIndexReaderParams.getEndInclusiveDataId(), dataIndexReaderParams.isReverse());
}
if (client.isVisibilityEnabled()) {
Stream<GeoWaveRow> stream = Streams.stream(iterator);
final Set<String> authorizations = Sets.newHashSet(dataIndexReaderParams.getAdditionalAuthorizations());
stream = stream.filter(new ClientVisibilityFilter(authorizations));
iterator = stream.iterator();
}
return iterator;
}
Aggregations