IDiskAtomFilter filter = ThriftValidation.asIFilter(predicate, cfm, null); RangeSliceCommand cmd = new RangeSliceCommand(keyspace, columnFamily, nowMillis, filter, new Bounds<RowPosition>(startPosition, endPosition), pageSize);
public AbstractRangeCommand forSubRange(AbstractBounds<RowPosition> subRange) { return new RangeSliceCommand(keyspace, columnFamily, timestamp, predicate.cloneShallow(), subRange, rowFilter, maxResults, countCQL3Rows, isPaging); }
public AbstractRangeCommand withUpdatedLimit(int newLimit) { return new RangeSliceCommand(keyspace, columnFamily, timestamp, predicate.cloneShallow(), keyRange, rowFilter, newLimit, countCQL3Rows, isPaging); }
public RangeSliceCommand deserialize(DataInput in, int version) throws IOException { String keyspace = in.readUTF(); String columnFamily = in.readUTF(); long timestamp = in.readLong(); CFMetaData metadata = Schema.instance.getCFMetaData(keyspace, columnFamily); if (metadata == null) { String message = String.format("Got range slice command for nonexistent table %s.%s. If the table was just " + "created, this is likely due to the schema not being fully propagated. Please wait for schema " + "agreement on table creation." , keyspace, columnFamily); throw new UnknownColumnFamilyException(message, null); } IDiskAtomFilter predicate = metadata.comparator.diskAtomFilterSerializer().deserialize(in, version); List<IndexExpression> rowFilter; int filterCount = in.readInt(); rowFilter = new ArrayList<>(filterCount); for (int i = 0; i < filterCount; i++) { rowFilter.add(IndexExpression.readFrom(in)); } AbstractBounds<RowPosition> range = AbstractBounds.serializer.deserialize(in, version).toRowBounds(); int maxResults = in.readInt(); boolean countCQL3Rows = in.readBoolean(); boolean isPaging = in.readBoolean(); return new RangeSliceCommand(keyspace, columnFamily, timestamp, predicate, range, rowFilter, maxResults, countCQL3Rows, isPaging); }
private List<Row> getHintsSlice(int columnCount) { // Get count # of columns... SliceQueryFilter predicate = new SliceQueryFilter(ColumnSlice.ALL_COLUMNS_ARRAY, false, columnCount); // From keys "" to ""... IPartitioner partitioner = StorageService.getPartitioner(); RowPosition minPos = partitioner.getMinimumToken().minKeyBound(); Range<RowPosition> range = new Range<>(minPos, minPos); try { RangeSliceCommand cmd = new RangeSliceCommand(Keyspace.SYSTEM_KS, SystemKeyspace.HINTS_CF, System.currentTimeMillis(), predicate, range, null, LARGE_NUMBER); return StorageProxy.getRangeSlice(cmd, ConsistencyLevel.ONE); } catch (Exception e) { logger.info("HintsCF getEPPendingHints timed out."); throw new RuntimeException(e); } }
private RangeSliceCommand getRangeCommand(QueryOptions options, int limit, long now) throws RequestValidationException { IDiskAtomFilter filter = makeFilter(options, limit); if (filter == null) return null; List<IndexExpression> expressions = getValidatedIndexExpressions(options); // The LIMIT provided by the user is the number of CQL row he wants returned. // We want to have getRangeSlice to count the number of columns, not the number of keys. AbstractBounds<RowPosition> keyBounds = getKeyBounds(options); return keyBounds == null ? null : new RangeSliceCommand(keyspace(), columnFamily(), now, filter, keyBounds, expressions, limit, !parameters.isDistinct, false); }
: select.getNumRecords(); List<org.apache.cassandra.db.Row> rows = StorageProxy.getRangeSlice(new RangeSliceCommand(metadata.ksName, select.getColumnFamily(), now,
RangeSliceCommand command = new RangeSliceCommand(keyspace, column_parent.column_family, now,
IDiskAtomFilter filter = ThriftValidation.asIFilter(predicate, cfm, null); RangeSliceCommand cmd = new RangeSliceCommand(keyspace, columnFamily, nowMillis, filter, new Bounds<RowPosition>(startPosition, endPosition), pageSize);
IDiskAtomFilter filter = ThriftValidation.asIFilter(predicate, cfm, null); RangeSliceCommand cmd = new RangeSliceCommand(keyspace, columnFamily, nowMillis, filter, new Bounds<RowPosition>(startPosition, endPosition), pageSize);
rows = StorageProxy.getRangeSlice(new RangeSliceCommand(keyspace, column_family, now, filter, bounds, null, range.count, true, true), consistencyLevel);
rows = StorageProxy.getRangeSlice(new RangeSliceCommand(keyspace, column_parent.column_family, now,