private boolean addCollectionTombstone(LegacyRangeTombstone tombstone) { if (!helper.includes(tombstone.start.collectionName)) return false; // see CASSANDRA-13109 if (clustering == null) { clustering = tombstone.start.getAsClustering(metadata); builder.newRow(clustering); } else if (!clustering.equals(tombstone.start.getAsClustering(metadata))) { return false; } builder.addComplexDeletion(tombstone.start.collectionName, tombstone.deletionTime); if (rowDeletion == null || tombstone.deletionTime.supersedes(rowDeletion.deletionTime)) collectionDeletion = tombstone; return true; }
private void updateNextToMerge() { if (!staticCells.hasNext()) { // Nothing more to merge. nextToMerge = null; return; } Cell cell = staticCells.next(); // Given a static cell, the equivalent row uses the column name as clustering and the value as unique cell value. builder.newRow(Clustering.make(cell.column().name.bytes)); builder.addCell(new BufferCell(metadata().compactValueColumn(), cell.timestamp(), cell.ttl(), cell.localDeletionTime(), cell.value(), cell.path())); nextToMerge = builder.build(); } }
private void updateNextToMerge() { if (!staticCells.hasNext()) { // Nothing more to merge. nextToMerge = null; return; } Cell cell = staticCells.next(); // Given a static cell, the equivalent row uses the column name as clustering and the value as unique cell value. builder.newRow(Clustering.make(cell.column().name.bytes)); builder.addCell(new BufferCell(metadata().compactValueColumn(), cell.timestamp(), cell.ttl(), cell.localDeletionTime(), cell.value(), cell.path())); nextToMerge = builder.build(); } }
public Unfiltered readNext() throws IOException { isReady = false; if (UnfilteredSerializer.kind(nextFlags) == Unfiltered.Kind.RANGE_TOMBSTONE_MARKER) { ClusteringBoundOrBoundary bound = clusteringDeserializer.deserializeNextBound(); return UnfilteredSerializer.serializer.deserializeMarkerBody(in, header, bound); } else { builder.newRow(clusteringDeserializer.deserializeNextClustering()); return UnfilteredSerializer.serializer.deserializeRowBody(in, header, helper, nextFlags, nextExtendedFlags, builder); } }
public Unfiltered readNext() throws IOException { isReady = false; if (UnfilteredSerializer.kind(nextFlags) == Unfiltered.Kind.RANGE_TOMBSTONE_MARKER) { ClusteringBoundOrBoundary bound = clusteringDeserializer.deserializeNextBound(); return UnfilteredSerializer.serializer.deserializeMarkerBody(in, header, bound); } else { builder.newRow(clusteringDeserializer.deserializeNextClustering()); return UnfilteredSerializer.serializer.deserializeRowBody(in, header, helper, nextFlags, nextExtendedFlags, builder); } }
public Unfiltered readNext() throws IOException { isReady = false; if (UnfilteredSerializer.kind(nextFlags) == Unfiltered.Kind.RANGE_TOMBSTONE_MARKER) { ClusteringBoundOrBoundary bound = clusteringDeserializer.deserializeNextBound(); return UnfilteredSerializer.serializer.deserializeMarkerBody(in, header, bound); } else { builder.newRow(clusteringDeserializer.deserializeNextClustering()); return UnfilteredSerializer.serializer.deserializeRowBody(in, header, helper, nextFlags, nextExtendedFlags, builder); } }
public RowBuilder(CFMetaData metadata, Object... clusteringColumns) { this.metadata = metadata; this.builder = BTreeRow.unsortedBuilder(FBUtilities.nowInSeconds()); this.builder.newRow(makeClustering(metadata, clusteringColumns)); }
private Row.Builder getBuilder(int index, Clustering clustering) { if (builders[index] == null) { builders[index] = BTreeRow.sortedBuilder(); builders[index].newRow(clustering); } return builders[index]; } };
private Row.Builder currentRow(int i, Clustering clustering) { if (currentRows[i] == null) { currentRows[i] = BTreeRow.sortedBuilder(); currentRows[i].newRow(clustering); } return currentRows[i]; }
public Unfiltered readNext() throws IOException { isReady = false; if (UnfilteredSerializer.kind(nextFlags) == Unfiltered.Kind.RANGE_TOMBSTONE_MARKER) { ClusteringBoundOrBoundary bound = clusteringDeserializer.deserializeNextBound(); return UnfilteredSerializer.serializer.deserializeMarkerBody(in, header, bound); } else { builder.newRow(clusteringDeserializer.deserializeNextClustering()); return UnfilteredSerializer.serializer.deserializeRowBody(in, header, helper, nextFlags, nextExtendedFlags, builder); } }
private Row.Builder currentRow(int i, Clustering clustering) { if (currentRows[i] == null) { currentRows[i] = BTreeRow.sortedBuilder(); currentRows[i].newRow(clustering); } return currentRows[i]; }
public RowBuilder(CFMetaData metadata, Object... clusteringColumns) { this.metadata = metadata; this.builder = BTreeRow.unsortedBuilder(FBUtilities.nowInSeconds()); this.builder.newRow(makeClustering(metadata, clusteringColumns)); }
private Row.Builder getBuilder(int index, Clustering clustering) { if (builders[index] == null) { builders[index] = BTreeRow.sortedBuilder(); builders[index].newRow(clustering); } return builders[index]; } };
public Row deserializeStaticRow(DataInputPlus in, SerializationHeader header, SerializationHelper helper) throws IOException { int flags = in.readUnsignedByte(); assert !isEndOfPartition(flags) && kind(flags) == Unfiltered.Kind.ROW && isExtended(flags) : flags; int extendedFlags = in.readUnsignedByte(); Row.Builder builder = BTreeRow.sortedBuilder(); builder.newRow(Clustering.STATIC_CLUSTERING); return deserializeRowBody(in, header, helper, flags, extendedFlags, builder); }
public RowBuilder(CFMetaData metadata, Object... clusteringColumns) { this.metadata = metadata; this.builder = BTreeRow.unsortedBuilder(FBUtilities.nowInSeconds()); this.builder.newRow(makeClustering(metadata, clusteringColumns)); }
public Row deserializeStaticRow(DataInputPlus in, SerializationHeader header, SerializationHelper helper) throws IOException { int flags = in.readUnsignedByte(); assert !isEndOfPartition(flags) && kind(flags) == Unfiltered.Kind.ROW && isExtended(flags) : flags; int extendedFlags = in.readUnsignedByte(); Row.Builder builder = BTreeRow.sortedBuilder(); builder.newRow(Clustering.STATIC_CLUSTERING); return deserializeRowBody(in, header, helper, flags, extendedFlags, builder); }
public Row deserializeStaticRow(DataInputPlus in, SerializationHeader header, SerializationHelper helper) throws IOException { int flags = in.readUnsignedByte(); assert !isEndOfPartition(flags) && kind(flags) == Unfiltered.Kind.ROW && isExtended(flags) : flags; int extendedFlags = in.readUnsignedByte(); Row.Builder builder = BTreeRow.sortedBuilder(); builder.newRow(Clustering.STATIC_CLUSTERING); return deserializeRowBody(in, header, helper, flags, extendedFlags, builder); }
private Row.Builder getBuilder(int index, Clustering clustering) { if (builders[index] == null) { builders[index] = BTreeRow.sortedBuilder(); builders[index].newRow(clustering); } return builders[index]; } };
public Row deserializeStaticRow(DataInputPlus in, SerializationHeader header, SerializationHelper helper) throws IOException { int flags = in.readUnsignedByte(); assert !isEndOfPartition(flags) && kind(flags) == Unfiltered.Kind.ROW && isExtended(flags) : flags; int extendedFlags = in.readUnsignedByte(); Row.Builder builder = BTreeRow.sortedBuilder(); builder.newRow(Clustering.STATIC_CLUSTERING); return deserializeRowBody(in, header, helper, flags, extendedFlags, builder); }
private Row.Builder currentRow(int i, Clustering clustering) { if (currentRows[i] == null) { currentRows[i] = BTreeRow.sortedBuilder(); currentRows[i].newRow(clustering); } return currentRows[i]; }