public CellPath deserialize(DataInputPlus in) throws IOException { return CellPath.create(ByteBufferUtil.readWithVIntLength(in)); }
public boolean isStale(Row data, ByteBuffer indexValue, int nowInSec) { Cell cell = data.getCell(indexedColumn, CellPath.create(indexValue)); return cell == null || !cell.isLive(nowInSec); }
public CellPath cellPathForField(FieldIdentifier fieldName) { // we use the field position instead of the field name to allow for field renaming in ALTER TYPE statements return CellPath.create(ByteBufferUtil.bytes((short)fieldPosition(fieldName))); }
public CellPath cellPathForField(FieldIdentifier fieldName) { // we use the field position instead of the field name to allow for field renaming in ALTER TYPE statements return CellPath.create(ByteBufferUtil.bytes((short)fieldPosition(fieldName))); }
public boolean isStale(Row data, ByteBuffer indexValue, int nowInSec) { Cell cell = data.getCell(indexedColumn, CellPath.create(indexValue)); return cell == null || !cell.isLive(nowInSec); }
public CellPath cellPathForField(FieldIdentifier fieldName) { // we use the field position instead of the field name to allow for field renaming in ALTER TYPE statements return CellPath.create(ByteBufferUtil.bytes((short)fieldPosition(fieldName))); }
public CellPath path() { if (MemoryUtil.getByte(peer+ HAS_CELLPATH) == 0) return null; long offset = peer + VALUE + MemoryUtil.getInt(peer + LENGTH); int size = MemoryUtil.getInt(offset); return CellPath.create(MemoryUtil.getByteBuffer(offset + 4, size, ByteOrder.BIG_ENDIAN)); }
public CellPath path() { if (MemoryUtil.getByte(peer+ HAS_CELLPATH) == 0) return null; long offset = peer + VALUE + MemoryUtil.getInt(peer + LENGTH); int size = MemoryUtil.getInt(offset); return CellPath.create(MemoryUtil.getByteBuffer(offset + 4, size, ByteOrder.BIG_ENDIAN)); }
private Cell cellFromColumn(CFMetaData metadata, LegacyLayout.LegacyCellName name, Column column) { CellPath path = name.collectionElement == null ? null : CellPath.create(name.collectionElement); int ttl = getTtl(metadata, column); return ttl == LivenessInfo.NO_TTL ? BufferCell.live(name.column, column.timestamp, column.value, path) : BufferCell.expiring(name.column, column.timestamp, ttl, FBUtilities.nowInSeconds(), column.value, path); }
public CellPath path() { if (MemoryUtil.getByte(peer+ HAS_CELLPATH) == 0) return null; long offset = peer + VALUE + MemoryUtil.getInt(peer + LENGTH); int size = MemoryUtil.getInt(offset); return CellPath.create(MemoryUtil.getByteBuffer(offset + 4, size, ByteOrder.BIG_ENDIAN)); }
private Cell cellFromColumn(CFMetaData metadata, LegacyLayout.LegacyCellName name, Column column) { CellPath path = name.collectionElement == null ? null : CellPath.create(name.collectionElement); int ttl = getTtl(metadata, column); return ttl == LivenessInfo.NO_TTL ? BufferCell.live(name.column, column.timestamp, column.value, path) : BufferCell.expiring(name.column, column.timestamp, ttl, FBUtilities.nowInSeconds(), column.value, path); }
public CellPath path() { if (MemoryUtil.getByte(peer+ HAS_CELLPATH) == 0) return null; long offset = peer + VALUE + MemoryUtil.getInt(peer + LENGTH); int size = MemoryUtil.getInt(offset); return CellPath.create(MemoryUtil.getByteBuffer(offset + 4, size, ByteOrder.BIG_ENDIAN)); }
public void execute(DecoratedKey partitionKey, UpdateParameters params) throws InvalidRequestException { assert column.type.isMultiCell() : "Attempted to delete a single element in a frozen set"; Term.Terminal elt = t.bind(params.options); if (elt == null) throw new InvalidRequestException("Invalid null set element"); params.addTombstone(column, CellPath.create(elt.get(params.options.getProtocolVersion()))); } }
public void execute(DecoratedKey partitionKey, UpdateParameters params) throws InvalidRequestException { assert column.type.isMultiCell() : "Attempted to delete a single element in a frozen set"; Term.Terminal elt = t.bind(params.options); if (elt == null) throw new InvalidRequestException("Invalid null set element"); params.addTombstone(column, CellPath.create(elt.get(params.options.getProtocolVersion()))); } }
public void execute(DecoratedKey partitionKey, UpdateParameters params) throws InvalidRequestException { assert column.type.isMultiCell() : "Attempted to delete a single element in a frozen set"; Term.Terminal elt = t.bind(params.options); if (elt == null) throw new InvalidRequestException("Invalid null set element"); params.addTombstone(column, CellPath.create(elt.get(params.options.getProtocolVersion()))); } }
public void execute(DecoratedKey partitionKey, UpdateParameters params) throws InvalidRequestException { assert column.type.isMultiCell() : "Attempted to delete a single element in a frozen set"; Term.Terminal elt = t.bind(params.options); if (elt == null) throw new InvalidRequestException("Invalid null set element"); params.addTombstone(column, CellPath.create(elt.get(params.options.getProtocolVersion()))); } }
public void execute(DecoratedKey partitionKey, UpdateParameters params) throws InvalidRequestException { assert column.type.isMultiCell() : "Attempted to delete a single key in a frozen map"; Term.Terminal key = t.bind(params.options); if (key == null) throw new InvalidRequestException("Invalid null map key"); if (key == Constants.UNSET_VALUE) throw new InvalidRequestException("Invalid unset map key"); params.addTombstone(column, CellPath.create(key.get(params.options.getProtocolVersion()))); } }
public void execute(DecoratedKey partitionKey, UpdateParameters params) throws InvalidRequestException { assert column.type.isMultiCell() : "Attempted to delete a single key in a frozen map"; Term.Terminal key = t.bind(params.options); if (key == null) throw new InvalidRequestException("Invalid null map key"); if (key == Constants.UNSET_VALUE) throw new InvalidRequestException("Invalid unset map key"); params.addTombstone(column, CellPath.create(key.get(params.options.getProtocolVersion()))); } }
public void execute(DecoratedKey partitionKey, UpdateParameters params) throws InvalidRequestException { assert column.type.isMultiCell() : "Attempted to delete a single key in a frozen map"; Term.Terminal key = t.bind(params.options); if (key == null) throw new InvalidRequestException("Invalid null map key"); if (key == Constants.UNSET_VALUE) throw new InvalidRequestException("Invalid unset map key"); params.addTombstone(column, CellPath.create(key.get(params.options.getProtocolVersion()))); } }
public void execute(DecoratedKey partitionKey, UpdateParameters params) throws InvalidRequestException { assert column.type.isMultiCell() : "Attempted to delete a single key in a frozen map"; Term.Terminal key = t.bind(params.options); if (key == null) throw new InvalidRequestException("Invalid null map key"); if (key == Constants.UNSET_VALUE) throw new InvalidRequestException("Invalid unset map key"); params.addTombstone(column, CellPath.create(key.get(params.options.getProtocolVersion()))); } }