private String getSlicesInfo(ColumnFamily container) { StringBuilder sb = new StringBuilder(); CellNameType type = container.metadata().comparator; for (ColumnSlice sl : slices) { assert sl != null; sb.append('['); sb.append(type.getString(sl.start)); sb.append('-'); sb.append(type.getString(sl.finish)); sb.append(']'); } return sb.toString(); }
public long serializedSize(NamesQueryFilter f, int version) { TypeSizes sizes = TypeSizes.NATIVE; int size = sizes.sizeof(f.columns.size()); ISerializer<CellName> serializer = type.cellSerializer(); for (CellName cName : f.columns) size += serializer.serializedSize(cName, sizes); size += sizes.sizeof(f.countCQL3Rows); return size; }
public NamesQueryFilter deserialize(DataInput in, int version) throws IOException { int size = in.readInt(); SortedSet<CellName> columns = new TreeSet<CellName>(type); ISerializer<CellName> serializer = type.cellSerializer(); for (int i = 0; i < size; ++i) columns.add(serializer.deserialize(in)); boolean countCQL3Rows = in.readBoolean(); return new NamesQueryFilter(columns, countCQL3Rows); }
public void serialize(NamesQueryFilter f, DataOutputPlus out, int version) throws IOException { out.writeInt(f.columns.size()); ISerializer<CellName> serializer = type.cellSerializer(); for (CellName cName : f.columns) { serializer.serialize(cName, out); } out.writeBoolean(f.countCQL3Rows); }
@Override public String getString(CellNameType comparator) { return String.format( "%s:%s@%d", comparator.getString(name()), ByteBufferUtil.toLong(value), timestamp()); }
public boolean countCQL3Rows(CellNameType comparator) { // If comparator is dense a cell == a CQL3 rows so we're always counting CQL3 rows // in particular. Otherwise, we do so only if we group the cells into CQL rows. return comparator.isDense() || compositesToGroup >= 0; }
public Comparator<Cell> getColumnComparator(CellNameType comparator) { return reversed ? comparator.columnReverseComparator() : comparator.columnComparator(false); }
public Comparator<Cell> getColumnComparator(CellNameType comparator) { return comparator.columnComparator(false); }