protected Iterator<Cell> collectionColumns(CellName collection, ColumnFamily cf, final long now) { // We are testing for collection equality, so we need to have the expected values *and* only those. ColumnSlice[] collectionSlice = new ColumnSlice[]{ collection.slice() }; // Filter live columns, this makes things simpler afterwards return Iterators.filter(cf.iterator(collectionSlice), new Predicate<Cell>() { public boolean apply(Cell c) { // we only care about live columns return c.isLive(now); } }); } }
public void execute(ByteBuffer rowKey, ColumnFamily cf, Composite prefix, UpdateParameters params) throws InvalidRequestException { if (column.type.isMultiCell()) { // delete + add CellName name = cf.getComparator().create(prefix, column); cf.addAtom(params.makeTombstoneForOverwrite(name.slice())); } Adder.doAdd(t, cf, prefix, column, params); } }
public void execute(ByteBuffer rowKey, ColumnFamily cf, Composite prefix, UpdateParameters params) throws InvalidRequestException { if (column.type.isMultiCell()) { // delete + put CellName name = cf.getComparator().create(prefix, column); cf.addAtom(params.makeTombstoneForOverwrite(name.slice())); } Putter.doPut(t, cf, prefix, column, params); } }
public void execute(ByteBuffer rowKey, ColumnFamily cf, Composite prefix, UpdateParameters params) throws InvalidRequestException { if (column.type.isMultiCell()) { // delete + append CellName name = cf.getComparator().create(prefix, column); cf.addAtom(params.makeTombstoneForOverwrite(name.slice())); } Appender.doAppend(t, cf, prefix, column, params); } }
public void execute(ByteBuffer rowKey, ColumnFamily cf, Composite prefix, UpdateParameters params) throws InvalidRequestException { CellName cname = cf.getComparator().create(prefix, column); if (column.type.isMultiCell()) cf.addAtom(params.makeRangeTombstone(cname.slice())); else cf.addColumn(params.makeTombstone(cname)); } };
Iterator<Cell> iter = data.iterator(new ColumnSlice[]{ data.getComparator().create(prefix, def).slice() }); while (iter.hasNext())