public void delete(IndexedEntry entry, OpOrder.Group opGroup) { int localDeletionTime = (int) (System.currentTimeMillis() / 1000); ColumnFamily cfi = ArrayBackedSortedColumns.factory.create(indexCfs.metadata); cfi.addTombstone(entry.indexEntry, localDeletionTime, entry.timestamp); indexCfs.apply(entry.indexValue, cfi, SecondaryIndexManager.nullUpdater, opGroup, null); if (logger.isDebugEnabled()) logger.debug("removed index entry for cleaned-up value {}:{}", entry.indexValue, cfi); }
private void doDelete(DecoratedKey indexKey, Clustering indexClustering, DeletionTime deletion, OpOrder.Group opGroup) { Row row = BTreeRow.emptyDeletedRow(indexClustering, Row.Deletion.regular(deletion)); PartitionUpdate upd = partitionUpdate(indexKey, row); indexCfs.apply(upd, UpdateTransaction.NO_OP, opGroup, null); logger.trace("Removed index entry for value {}", indexKey); }
private void doDelete(DecoratedKey indexKey, Clustering indexClustering, DeletionTime deletion, OpOrder.Group opGroup) { Row row = BTreeRow.emptyDeletedRow(indexClustering, Row.Deletion.regular(deletion)); PartitionUpdate upd = partitionUpdate(indexKey, row); indexCfs.apply(upd, UpdateTransaction.NO_OP, opGroup, null); logger.trace("Removed index entry for value {}", indexKey); }
private void doDelete(DecoratedKey indexKey, Clustering indexClustering, DeletionTime deletion, OpOrder.Group opGroup) { Row row = BTreeRow.emptyDeletedRow(indexClustering, Row.Deletion.regular(deletion)); PartitionUpdate upd = partitionUpdate(indexKey, row); indexCfs.apply(upd, UpdateTransaction.NO_OP, opGroup, null); logger.trace("Removed index entry for value {}", indexKey); }
public void deleteForCleanup(ByteBuffer rowKey, Cell cell, OpOrder.Group opGroup) { if (!cell.isLive()) return; DecoratedKey valueKey = getIndexKeyFor(getIndexedValue(rowKey, cell)); int localDeletionTime = (int) (System.currentTimeMillis() / 1000); ColumnFamily cfi = ArrayBackedSortedColumns.factory.create(indexCfs.metadata, false, 1); cfi.addTombstone(makeIndexColumnName(rowKey, cell), localDeletionTime, cell.timestamp()); indexCfs.apply(valueKey, cfi, SecondaryIndexManager.nullUpdater, opGroup, null); if (logger.isDebugEnabled()) logger.debug("removed index entry for cleaned-up value {}:{}", valueKey, cfi); }
/** * Called when adding a new entry to the index */ private void insert(ByteBuffer rowKey, Clustering clustering, Cell cell, LivenessInfo info, OpOrder.Group opGroup) { DecoratedKey valueKey = getIndexKeyFor(getIndexedValue(rowKey, clustering, cell)); Row row = BTreeRow.noCellLiveRow(buildIndexClustering(rowKey, clustering, cell), info); PartitionUpdate upd = partitionUpdate(valueKey, row); indexCfs.apply(upd, UpdateTransaction.NO_OP, opGroup, null); logger.trace("Inserted entry into index for value {}", valueKey); }
/** * Called when adding a new entry to the index */ private void insert(ByteBuffer rowKey, Clustering clustering, Cell cell, LivenessInfo info, OpOrder.Group opGroup) { DecoratedKey valueKey = getIndexKeyFor(getIndexedValue(rowKey, clustering, cell)); Row row = BTreeRow.noCellLiveRow(buildIndexClustering(rowKey, clustering, cell), info); PartitionUpdate upd = partitionUpdate(valueKey, row); indexCfs.apply(upd, UpdateTransaction.NO_OP, opGroup, null); logger.trace("Inserted entry into index for value {}", valueKey); }
/** * Called when adding a new entry to the index */ private void insert(ByteBuffer rowKey, Clustering clustering, Cell cell, LivenessInfo info, OpOrder.Group opGroup) { DecoratedKey valueKey = getIndexKeyFor(getIndexedValue(rowKey, clustering, cell)); Row row = BTreeRow.noCellLiveRow(buildIndexClustering(rowKey, clustering, cell), info); PartitionUpdate upd = partitionUpdate(valueKey, row); indexCfs.apply(upd, UpdateTransaction.NO_OP, opGroup, null); logger.trace("Inserted entry into index for value {}", valueKey); }
? cfs.indexManager.newUpdateTransaction(upd, opGroup, nowInSec) : UpdateTransaction.NO_OP; cfs.apply(upd, indexTransaction, opGroup, commitLogPosition); if (requiresViewUpdate) baseComplete.set(System.currentTimeMillis());
? cfs.indexManager.newUpdateTransaction(upd, opGroup, nowInSec) : UpdateTransaction.NO_OP; cfs.apply(upd, indexTransaction, opGroup, commitLogPosition); if (requiresViewUpdate) baseComplete.set(System.currentTimeMillis());
? cfs.indexManager.newUpdateTransaction(upd, opGroup, nowInSec) : UpdateTransaction.NO_OP; cfs.apply(upd, indexTransaction, opGroup, commitLogPosition); if (requiresViewUpdate) baseComplete.set(System.currentTimeMillis());
public void insert(ByteBuffer rowKey, Cell cell, OpOrder.Group opGroup) { DecoratedKey valueKey = getIndexKeyFor(getIndexedValue(rowKey, cell)); ColumnFamily cfi = ArrayBackedSortedColumns.factory.create(indexCfs.metadata, false, 1); CellName name = makeIndexColumnName(rowKey, cell); if (cell instanceof ExpiringCell) { ExpiringCell ec = (ExpiringCell) cell; cfi.addColumn(new BufferExpiringCell(name, ByteBufferUtil.EMPTY_BYTE_BUFFER, ec.timestamp(), ec.getTimeToLive(), ec.getLocalDeletionTime())); } else { cfi.addColumn(new BufferCell(name, ByteBufferUtil.EMPTY_BYTE_BUFFER, cell.timestamp())); } if (logger.isDebugEnabled()) logger.debug("applying index row {} in {}", indexCfs.metadata.getKeyValidator().getString(valueKey.getKey()), cfi); indexCfs.apply(valueKey, cfi, SecondaryIndexManager.nullUpdater, opGroup, null); }
? cfs.indexManager.updaterFor(key, cf, opGroup) : SecondaryIndexManager.nullUpdater; cfs.apply(key, cf, updater, opGroup, replayPosition);