List of usage examples for org.apache.cassandra.db.filter ClusteringIndexNamesFilter ClusteringIndexNamesFilter
public ClusteringIndexNamesFilter(NavigableSet<Clustering> clusterings, boolean reversed)
From source file:com.stratio.cassandra.lucene.IndexReaderWide.java
License:Apache License
@Override protected boolean prepareNext() { if (next != null) { return true; }/* ww w . jav a 2 s . c om*/ if (nextDoc == null) { if (!documents.hasNext()) { return false; } nextDoc = documents.next(); } DecoratedKey key = service.decoratedKey(nextDoc.left); NavigableSet<Clustering> clusterings = clusterings(key); if (clusterings.isEmpty()) { return prepareNext(); } ClusteringIndexFilter filter = new ClusteringIndexNamesFilter(clusterings, false); UnfilteredRowIterator data = read(key, filter); if (data.isEmpty()) { data.close(); return prepareNext(); } next = data; return true; }
From source file:com.stratio.cassandra.lucene.IndexService.java
License:Apache License
/** * Retrieves from the local storage the {@link Row}s in the specified partition slice. * * @param key the partition key/*from w w w.j ava 2 s .com*/ * @param clusterings the clustering keys * @param nowInSec max allowed time in seconds * @param opGroup operation group spanning the calling operation * @return a {@link Row} iterator */ public UnfilteredRowIterator read(DecoratedKey key, NavigableSet<Clustering> clusterings, int nowInSec, OpOrder.Group opGroup) { ClusteringIndexNamesFilter filter = new ClusteringIndexNamesFilter(clusterings, false); ColumnFilter columnFilter = ColumnFilter.all(metadata); return SinglePartitionReadCommand.create(metadata, nowInSec, key, columnFilter, filter) .queryMemtableAndDisk(table, opGroup); }
From source file:io.puntanegra.fhir.index.FhirIndexSearcher.java
License:Apache License
@Override public boolean hasNext() { if (next != null) { return true; }// www. j a v a 2s . c o m if (nextDoc == null) { if (!documents.hasNext()) { return false; } nextDoc = documents.next(); } DecoratedKey key = service.decoratedKey(nextDoc.left); NavigableSet<Clustering> clusterings = clusterings(key); if (clusterings.isEmpty()) { return hasNext(); } ClusteringIndexFilter filter = new ClusteringIndexNamesFilter(clusterings, false); UnfilteredRowIterator data = read(key, filter); if (data.isEmpty()) { data.close(); return hasNext(); } next = data; return true; }
From source file:io.puntanegra.fhir.index.FhirIndexService.java
License:Apache License
/** * Retrieves from the local storage the {@link Row}s in the specified * partition slice./*from w w w . java 2 s .c o m*/ * * @param key * the partition key * @param clusterings * the clustering keys * @param nowInSec * max allowed time in seconds * @param opGroup * operation group spanning the calling operation * @return a {@link Row} iterator */ private UnfilteredRowIterator read(DecoratedKey key, NavigableSet<Clustering> clusterings, int nowInSec, OpOrder.Group opGroup) { ClusteringIndexNamesFilter filter = new ClusteringIndexNamesFilter(clusterings, false); ColumnFilter columnFilter = ColumnFilter.all(metadata); return SinglePartitionReadCommand.create(metadata, nowInSec, key, columnFilter, filter) .queryMemtableAndDisk(table, opGroup); }