public long serializedSize(Unfiltered unfiltered, SerializationHeader header, long previousUnfilteredSize,int version) { return unfiltered.kind() == Unfiltered.Kind.RANGE_TOMBSTONE_MARKER ? serializedSize((RangeTombstoneMarker) unfiltered, header, previousUnfilteredSize, version) : serializedSize((Row) unfiltered, header, previousUnfilteredSize, version); }
public long serializedSize(UnfilteredRowIterator iterator, ColumnFilter selection, int version, int rowEstimate) { SerializationHeader header = new SerializationHeader(false, iterator.metadata(), iterator.columns(), iterator.stats()); assert rowEstimate >= 0; long size = ByteBufferUtil.serializedSizeWithVIntLength(iterator.partitionKey().getKey()) + 1; // flags if (iterator.isEmpty()) return size; DeletionTime partitionDeletion = iterator.partitionLevelDeletion(); Row staticRow = iterator.staticRow(); boolean hasStatic = staticRow != Rows.EMPTY_STATIC_ROW; size += SerializationHeader.serializer.serializedSizeForMessaging(header, selection, hasStatic); if (!partitionDeletion.isLive()) size += header.deletionTimeSerializedSize(partitionDeletion); if (hasStatic) size += UnfilteredSerializer.serializer.serializedSize(staticRow, header, version); if (rowEstimate >= 0) size += TypeSizes.sizeofUnsignedVInt(rowEstimate); while (iterator.hasNext()) size += UnfilteredSerializer.serializer.serializedSize(iterator.next(), header, version); size += UnfilteredSerializer.serializer.serializedSizeEndOfPartition(); return size; }
public long serializedSize(UnfilteredRowIterator iterator, ColumnFilter selection, int version, int rowEstimate) { SerializationHeader header = new SerializationHeader(false, iterator.metadata(), iterator.columns(), iterator.stats()); assert rowEstimate >= 0; long size = ByteBufferUtil.serializedSizeWithVIntLength(iterator.partitionKey().getKey()) + 1; // flags if (iterator.isEmpty()) return size; DeletionTime partitionDeletion = iterator.partitionLevelDeletion(); Row staticRow = iterator.staticRow(); boolean hasStatic = staticRow != Rows.EMPTY_STATIC_ROW; size += SerializationHeader.serializer.serializedSizeForMessaging(header, selection, hasStatic); if (!partitionDeletion.isLive()) size += header.deletionTimeSerializedSize(partitionDeletion); if (hasStatic) size += UnfilteredSerializer.serializer.serializedSize(staticRow, header, version); if (rowEstimate >= 0) size += TypeSizes.sizeofUnsignedVInt(rowEstimate); while (iterator.hasNext()) size += UnfilteredSerializer.serializer.serializedSize(iterator.next(), header, version); size += UnfilteredSerializer.serializer.serializedSizeEndOfPartition(); return size; }
public long serializedSize(Unfiltered unfiltered, SerializationHeader header, long previousUnfilteredSize,int version) { return unfiltered.kind() == Unfiltered.Kind.RANGE_TOMBSTONE_MARKER ? serializedSize((RangeTombstoneMarker) unfiltered, header, previousUnfilteredSize, version) : serializedSize((Row) unfiltered, header, previousUnfilteredSize, version); }
public long serializedSize(UnfilteredRowIterator iterator, ColumnFilter selection, int version, int rowEstimate) { SerializationHeader header = new SerializationHeader(false, iterator.metadata(), iterator.columns(), iterator.stats()); assert rowEstimate >= 0; long size = ByteBufferUtil.serializedSizeWithVIntLength(iterator.partitionKey().getKey()) + 1; // flags if (iterator.isEmpty()) return size; DeletionTime partitionDeletion = iterator.partitionLevelDeletion(); Row staticRow = iterator.staticRow(); boolean hasStatic = staticRow != Rows.EMPTY_STATIC_ROW; size += SerializationHeader.serializer.serializedSizeForMessaging(header, selection, hasStatic); if (!partitionDeletion.isLive()) size += header.deletionTimeSerializedSize(partitionDeletion); if (hasStatic) size += UnfilteredSerializer.serializer.serializedSize(staticRow, header, version); if (rowEstimate >= 0) size += TypeSizes.sizeofUnsignedVInt(rowEstimate); while (iterator.hasNext()) size += UnfilteredSerializer.serializer.serializedSize(iterator.next(), header, version); size += UnfilteredSerializer.serializer.serializedSizeEndOfPartition(); return size; }
public long serializedSize(Unfiltered unfiltered, SerializationHeader header, long previousUnfilteredSize,int version) { return unfiltered.kind() == Unfiltered.Kind.RANGE_TOMBSTONE_MARKER ? serializedSize((RangeTombstoneMarker) unfiltered, header, previousUnfilteredSize, version) : serializedSize((Row) unfiltered, header, previousUnfilteredSize, version); }
public long serializedSize(UnfilteredRowIterator iterator, ColumnFilter selection, int version, int rowEstimate) { SerializationHeader header = new SerializationHeader(false, iterator.metadata(), iterator.columns(), iterator.stats()); assert rowEstimate >= 0; long size = ByteBufferUtil.serializedSizeWithVIntLength(iterator.partitionKey().getKey()) + 1; // flags if (iterator.isEmpty()) return size; DeletionTime partitionDeletion = iterator.partitionLevelDeletion(); Row staticRow = iterator.staticRow(); boolean hasStatic = staticRow != Rows.EMPTY_STATIC_ROW; size += SerializationHeader.serializer.serializedSizeForMessaging(header, selection, hasStatic); if (!partitionDeletion.isLive()) size += header.deletionTimeSerializedSize(partitionDeletion); if (hasStatic) size += UnfilteredSerializer.serializer.serializedSize(staticRow, header, version); if (rowEstimate >= 0) size += TypeSizes.sizeofUnsignedVInt(rowEstimate); while (iterator.hasNext()) size += UnfilteredSerializer.serializer.serializedSize(iterator.next(), header, version); size += UnfilteredSerializer.serializer.serializedSizeEndOfPartition(); return size; }
public long serializedSize(Unfiltered unfiltered, SerializationHeader header, long previousUnfilteredSize,int version) { return unfiltered.kind() == Unfiltered.Kind.RANGE_TOMBSTONE_MARKER ? serializedSize((RangeTombstoneMarker) unfiltered, header, previousUnfilteredSize, version) : serializedSize((Row) unfiltered, header, previousUnfilteredSize, version); }
public long serializedSize(Unfiltered unfiltered, SerializationHeader header, int version) { assert !header.isForSSTable(); return serializedSize(unfiltered, header, 0, version); }
public long serializedSize(Unfiltered unfiltered, SerializationHeader header, int version) { assert !header.isForSSTable(); return serializedSize(unfiltered, header, 0, version); }
public long serializedSize(Unfiltered unfiltered, SerializationHeader header, int version) { assert !header.isForSSTable(); return serializedSize(unfiltered, header, 0, version); }
public long serializedSize(Unfiltered unfiltered, SerializationHeader header, int version) { assert !header.isForSSTable(); return serializedSize(unfiltered, header, 0, version); }
private void countRow(Row row) { // Note that the accounting of a row is a bit inaccurate (it doesn't take some of the file format optimization into account) // and the maintaining of the bufferSize is in general not perfect. This has always been the case for this class but we should // improve that. In particular, what we count is closer to the serialized value, but it's debatable that it's the right thing // to count since it will take a lot more space in memory and the bufferSize if first and foremost used to avoid OOM when // using this writer. currentSize += UnfilteredSerializer.serializer.serializedSize(row, header, 0, formatType.info.getLatestVersion().correspondingMessagingVersion()); }
private void countRow(Row row) { // Note that the accounting of a row is a bit inaccurate (it doesn't take some of the file format optimization into account) // and the maintaining of the bufferSize is in general not perfect. This has always been the case for this class but we should // improve that. In particular, what we count is closer to the serialized value, but it's debatable that it's the right thing // to count since it will take a lot more space in memory and the bufferSize if first and foremost used to avoid OOM when // using this writer. currentSize += UnfilteredSerializer.serializer.serializedSize(row, header, 0, formatType.info.getLatestVersion().correspondingMessagingVersion()); }
private void countRow(Row row) { // Note that the accounting of a row is a bit inaccurate (it doesn't take some of the file format optimization into account) // and the maintaining of the bufferSize is in general not perfect. This has always been the case for this class but we should // improve that. In particular, what we count is closer to the serialized value, but it's debatable that it's the right thing // to count since it will take a lot more space in memory and the bufferSize if first and foremost used to avoid OOM when // using this writer. currentSize += UnfilteredSerializer.serializer.serializedSize(row, header, 0, formatType.info.getLatestVersion().correspondingMessagingVersion()); }