use of org.locationtech.geowave.datastore.filesystem.util.FileSystemDataIndexTable in project geowave by locationtech.
the class FileSystemReader method createIteratorForDataIndexReader.
private Iterator<GeoWaveRow> createIteratorForDataIndexReader(final FileSystemClient client, final DataIndexReaderParams dataIndexReaderParams) {
final FileSystemDataIndexTable dataIndexTable = FileSystemUtils.getDataIndexTable(client, dataIndexReaderParams.getAdapterId(), dataIndexReaderParams.getInternalAdapterStore().getTypeName(dataIndexReaderParams.getAdapterId()));
Iterator<GeoWaveRow> iterator;
if (dataIndexReaderParams.getDataIds() != null) {
iterator = dataIndexTable.dataIndexIterator(dataIndexReaderParams.getDataIds());
} else {
iterator = dataIndexTable.dataIndexIterator(dataIndexReaderParams.getStartInclusiveDataId(), dataIndexReaderParams.getEndInclusiveDataId());
}
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;
}
use of org.locationtech.geowave.datastore.filesystem.util.FileSystemDataIndexTable in project geowave by locationtech.
the class FileSystemOperations method deleteRowsFromDataIndex.
public void deleteRowsFromDataIndex(final byte[][] dataIds, final short adapterId, final String typeName) {
final FileSystemDataIndexTable table = FileSystemUtils.getDataIndexTable(client, adapterId, typeName);
Arrays.stream(dataIds).forEach(d -> table.deleteDataId(d));
}
Aggregations