static void skipForCache(DataInputPlus in) throws IOException { /*long indexFilePosition =*/in.readUnsignedVInt(); /*long headerLength =*/in.readUnsignedVInt(); /*DeletionTime deletionTime = */DeletionTime.serializer.skip(in); /*int columnsIndexCount = (int)*/in.readUnsignedVInt(); /*int indexedPartSize = (int)*/in.readUnsignedVInt(); } }
static void skipForCache(DataInputPlus in) throws IOException { /*long indexFilePosition =*/in.readUnsignedVInt(); /*long headerLength =*/in.readUnsignedVInt(); /*DeletionTime deletionTime = */DeletionTime.serializer.skip(in); /*int columnsIndexCount = (int)*/in.readUnsignedVInt(); /*int indexedPartSize = (int)*/in.readUnsignedVInt(); } }
public EncodingStats deserialize(DataInputPlus in) throws IOException { long minTimestamp = in.readUnsignedVInt() + TIMESTAMP_EPOCH; int minLocalDeletionTime = (int)in.readUnsignedVInt() + DELETION_TIME_EPOCH; int minTTL = (int)in.readUnsignedVInt() + TTL_EPOCH; return new EncodingStats(minTimestamp, minLocalDeletionTime, minTTL); } }
static long deserializePositionAndSkip(DataInputPlus in) throws IOException { long position = in.readUnsignedVInt(); int size = (int) in.readUnsignedVInt(); if (size > 0) in.skipBytesFully(size); return position; }
private static Collection<Mutation> decodeMutations(DataInputPlus in, int version) throws IOException { int count = (int) in.readUnsignedVInt(); ArrayList<Mutation> mutations = new ArrayList<>(count); for (int i = 0; i < count; i++) { in.readUnsignedVInt(); // skip mutation size mutations.add(Mutation.serializer.deserialize(in, version)); } return mutations; } }
public void skipRowBody(DataInputPlus in) throws IOException { int rowSize = (int)in.readUnsignedVInt(); in.skipBytesFully(rowSize); }
public static ByteBuffer readWithVIntLength(DataInputPlus in) throws IOException { int length = (int)in.readUnsignedVInt(); if (length < 0) throw new IOException("Corrupt (negative) value length encountered"); return ByteBufferUtil.read(in, length); }
private static Collection<ByteBuffer> readEncodedMutations(DataInputPlus in) throws IOException { int count = (int) in.readUnsignedVInt(); ArrayList<ByteBuffer> mutations = new ArrayList<>(count); for (int i = 0; i < count; i++) mutations.add(ByteBufferUtil.readWithVIntLength(in)); return mutations; }
public void skipRowBody(DataInputPlus in) throws IOException { int rowSize = (int)in.readUnsignedVInt(); in.skipBytesFully(rowSize); }
public void skipMarkerBody(DataInputPlus in) throws IOException { int markerSize = (int)in.readUnsignedVInt(); in.skipBytesFully(markerSize); }
public static void skipWithVIntLength(DataInputPlus in) throws IOException { int length = (int)in.readUnsignedVInt(); if (length < 0) throw new IOException("Corrupt (negative) value length encountered"); in.skipBytesFully(length); }
private void readColumnsWithType(DataInputPlus in, Map<ByteBuffer, AbstractType<?>> typeMap) throws IOException { int length = (int)in.readUnsignedVInt(); for (int i = 0; i < length; i++) { ByteBuffer name = ByteBufferUtil.readWithVIntLength(in); typeMap.put(name, readType(in)); } }
private void skipComplexColumn(DataInputPlus in, ColumnDefinition column, SerializationHeader header, boolean hasComplexDeletion) throws IOException { if (hasComplexDeletion) header.skipDeletionTime(in); int count = (int) in.readUnsignedVInt(); while (--count >= 0) Cell.serializer.skip(in, column, header); }
private boolean deserializeOne() throws IOException { if (deserializedSize == nextSize) return false; if ((deserializedSize % 32) == 0) nextHeader = in.readUnsignedVInt(); int i = deserializedSize++; nextValues[i] = Serializer.isNull(nextHeader, i) ? null : (Serializer.isEmpty(nextHeader, i) ? ByteBufferUtil.EMPTY_BYTE_BUFFER : serializationHeader.clusteringTypes().get(i).readValue(in, DatabaseDescriptor.getMaxValueSize())); return true; }
public RowFilter deserialize(DataInputPlus in, int version, CFMetaData metadata) throws IOException { boolean forThrift = in.readBoolean(); int size = (int)in.readUnsignedVInt(); List<Expression> expressions = new ArrayList<>(size); for (int i = 0; i < size; i++) expressions.add(Expression.serializer.deserialize(in, version, metadata)); return forThrift ? new ThriftFilter(expressions) : new CQLFilter(expressions); }
public RowFilter deserialize(DataInputPlus in, int version, CFMetaData metadata) throws IOException { boolean forThrift = in.readBoolean(); int size = (int)in.readUnsignedVInt(); List<Expression> expressions = new ArrayList<>(size); for (int i = 0; i < size; i++) expressions.add(Expression.serializer.deserialize(in, version, metadata)); return forThrift ? new ThriftFilter(expressions) : new CQLFilter(expressions); }
private static void skipPromotedIndex(DataInputPlus in, Version version) throws IOException { int size = version.storeRows() ? (int)in.readUnsignedVInt() : in.readInt(); if (size <= 0) return; in.skipBytesFully(size); }
public Hint deserialize(DataInputPlus in, int version) throws IOException { long creationTime = in.readLong(); int gcgs = (int) in.readUnsignedVInt(); return new Hint(Mutation.serializer.deserialize(in, version), creationTime, gcgs); } }
public ClusteringIndexFilter deserialize(DataInputPlus in, int version, CFMetaData metadata, boolean reversed) throws IOException { ClusteringComparator comparator = metadata.comparator; BTreeSet.Builder<Clustering> clusterings = BTreeSet.builder(comparator); int size = (int)in.readUnsignedVInt(); for (int i = 0; i < size; i++) clusterings.add(Clustering.serializer.deserialize(in, version, comparator.subtypes())); return new ClusteringIndexNamesFilter(clusterings.build(), reversed); } }
public ClusteringIndexFilter deserialize(DataInputPlus in, int version, CFMetaData metadata, boolean reversed) throws IOException { ClusteringComparator comparator = metadata.comparator; BTreeSet.Builder<Clustering> clusterings = BTreeSet.builder(comparator); int size = (int)in.readUnsignedVInt(); for (int i = 0; i < size; i++) clusterings.add(Clustering.serializer.deserialize(in, version, comparator.subtypes())); return new ClusteringIndexNamesFilter(clusterings.build(), reversed); } }