@Override public boolean apply(@Nullable Row row) { // The hasOnlyTombstones(x) call below ultimately calls Column.isMarkedForDelete(x) return !(row == null || row.cf == null || row.cf.isMarkedForDelete() || row.cf.hasOnlyTombstones(nowMillis)); } });
if (row.cf != null && !row.cf.isMarkedForDelete())
if (row.cf == null || row.cf.isMarkedForDelete())
if (cf.isMarkedForDelete()) return EntryList.EMPTY_LIST;
@Override public boolean apply(@Nullable Row row) { // The hasOnlyTombstones(x) call below ultimately calls Column.isMarkedForDelete(x) return !(row == null || row.cf == null || row.cf.isMarkedForDelete() || row.cf.hasOnlyTombstones(nowMillis)); } });
@Override public boolean apply(@Nullable Row row) { // The hasOnlyTombstones(x) call below ultimately calls Column.isMarkedForDelete(x) return !(row == null || row.cf == null || row.cf.isMarkedForDelete() || row.cf.hasOnlyTombstones(nowMillis)); } });
public static boolean invalidSchemaRow(Row row) { return row.cf == null || (row.cf.isMarkedForDelete() && !row.cf.hasColumns()); }
@Override public String toString() { StringBuilder sb = new StringBuilder("ColumnFamily("); sb.append(metadata.cfName); if (isMarkedForDelete()) sb.append(" -").append(deletionInfo()).append("-"); sb.append(" [").append(CellNames.getColumnsString(getComparator(), this)).append("])"); return sb.toString(); }
/** * Purges gc-able top-level and range tombstones, returning `cf` if there are any columns or tombstones left, * null otherwise. * @param gcBefore a timestamp (in seconds); tombstones with a localDeletionTime before this will be purged */ public static ColumnFamily removeDeletedCF(ColumnFamily cf, int gcBefore) { // purge old top-level and range tombstones cf.purgeTombstones(gcBefore); // if there are no columns or tombstones left, return null return !cf.hasColumns() && !cf.isMarkedForDelete() ? null : cf; }
public LogEntry(String keyspace, ColumnFamily columnFamily, ByteBuffer rowKey, ConsistencyLevel consistencyLevel, String host, long timestamp, Collection<String> columnNames) throws Throwable { this(keyspace, rowKey, consistencyLevel, host, timestamp, columnNames); this.columnFamily = columnFamily.metadata().cfName; for (IColumn column : columnFamily.getSortedColumns()) { ColumnOperation operation = new ColumnOperation(); operation.setName(column.name()); operation.setDelete(columnFamily.isMarkedForDelete()); operations.add(operation); } }
} else { DeletionInfo deletionInfo = cf.deletionInfo(); if (deletionInfo != null && cf.isMarkedForDelete()) { if (deletionInfo.rangeIterator().hasNext()) { deleteRowsMarked(indexer, deletionInfo);
public static RowIndexEntry rawAppend(ColumnFamily cf, long startPosition, DecoratedKey key, DataOutputPlus out) throws IOException { assert cf.hasColumns() || cf.isMarkedForDelete(); ColumnIndex.Builder builder = new ColumnIndex.Builder(cf, key.getKey(), out); ColumnIndex index = builder.build(cf); out.writeShort(END_OF_ROW); return RowIndexEntry.create(startPosition, cf.deletionInfo().getTopLevelDeletion(), index); }
if (columnsIndex.columnsIndex.isEmpty() && !emptyColumnFamily.isMarkedForDelete()) return null;
currentOperations.addAndGet(cf.getColumnCount() + (cf.isMarkedForDelete() ? 1 : 0) + cf.deletionInfo().rangeCount()); return pair.right;
if (cf.isMarkedForDelete()) return EntryList.EMPTY_LIST;
if (cf.isMarkedForDelete()) return EntryList.EMPTY_LIST;