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); }
public PagedRangeCommand deserialize(DataInput in, int version) throws IOException { String keyspace = in.readUTF(); String columnFamily = in.readUTF(); long timestamp = in.readLong(); AbstractBounds<RowPosition> keyRange = AbstractBounds.serializer.deserialize(in, version).toRowBounds(); CFMetaData metadata = Schema.instance.getCFMetaData(keyspace, columnFamily); if (metadata == null) { String message = String.format("Got paged range 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); } SliceQueryFilter predicate = metadata.comparator.sliceQueryFilterSerializer().deserialize(in, version); Composite start = metadata.comparator.serializer().deserialize(in); Composite stop = metadata.comparator.serializer().deserialize(in); int filterCount = in.readInt(); List<IndexExpression> rowFilter = new ArrayList<IndexExpression>(filterCount); for (int i = 0; i < filterCount; i++) { rowFilter.add(IndexExpression.readFrom(in)); } int limit = in.readInt(); boolean countCQL3Rows = version >= MessagingService.VERSION_21 ? in.readBoolean() : predicate.compositesToGroup >= 0 || predicate.count != 1; // See #6857 return new PagedRangeCommand(keyspace, columnFamily, timestamp, keyRange, predicate, start, stop, rowFilter, limit, countCQL3Rows); }