/** * Returns whether the given name/timestamp pair is deleted by one of the tombstone * of this RangeTombstoneList. */ public boolean isDeleted(Clustering clustering, Cell cell) { int idx = searchInternal(clustering, 0, size); // No matter what the counter cell's timestamp is, a tombstone always takes precedence. See CASSANDRA-7346. return idx >= 0 && (cell.isCounterCell() || markedAts[idx] >= cell.timestamp()); }
/** * Returns whether the given name/timestamp pair is deleted by one of the tombstone * of this RangeTombstoneList. */ public boolean isDeleted(Clustering clustering, Cell cell) { int idx = searchInternal(clustering, 0, size); // No matter what the counter cell's timestamp is, a tombstone always takes precedence. See CASSANDRA-7346. return idx >= 0 && (cell.isCounterCell() || markedAts[idx] >= cell.timestamp()); }
/** * Returns whether the given name/timestamp pair is deleted by one of the tombstone * of this RangeTombstoneList. */ public boolean isDeleted(Clustering clustering, Cell cell) { int idx = searchInternal(clustering, 0, size); // No matter what the counter cell's timestamp is, a tombstone always takes precedence. See CASSANDRA-7346. return idx >= 0 && (cell.isCounterCell() || markedAts[idx] >= cell.timestamp()); }
/** * Returns whether the given name/timestamp pair is deleted by one of the tombstone * of this RangeTombstoneList. */ public boolean isDeleted(Clustering clustering, Cell cell) { int idx = searchInternal(clustering, 0, size); // No matter what the counter cell's timestamp is, a tombstone always takes precedence. See CASSANDRA-7346. return idx >= 0 && (cell.isCounterCell() || markedAts[idx] >= cell.timestamp()); }
private void addMarksForRow(Row row, List<CounterMark> marks) { for (Cell cell : row.cells()) { if (cell.isCounterCell()) marks.add(new CounterMark(row, cell.column(), cell.path())); } }
/** * Collect statistics ont a given cell. * * @param cell the cell for which to collect stats. * @param collector the stats collector. */ public static void collectStats(Cell cell, PartitionStatisticsCollector collector) { collector.update(cell); if (cell.isCounterCell()) collector.updateHasLegacyCounterShards(CounterCells.hasLegacyShards(cell)); }
/** * Collect statistics ont a given cell. * * @param cell the cell for which to collect stats. * @param collector the stats collector. */ public static void collectStats(Cell cell, PartitionStatisticsCollector collector) { collector.update(cell); if (cell.isCounterCell()) collector.updateHasLegacyCounterShards(CounterCells.hasLegacyShards(cell)); }
private void addMarksForRow(Row row, List<CounterMark> marks) { for (Cell cell : row.cells()) { if (cell.isCounterCell()) marks.add(new CounterMark(row, cell.column(), cell.path())); } }
/** * Collect statistics ont a given cell. * * @param cell the cell for which to collect stats. * @param collector the stats collector. */ public static void collectStats(Cell cell, PartitionStatisticsCollector collector) { collector.update(cell); if (cell.isCounterCell()) collector.updateHasLegacyCounterShards(CounterCells.hasLegacyShards(cell)); }
/** * Collect statistics ont a given cell. * * @param cell the cell for which to collect stats. * @param collector the stats collector. */ public static void collectStats(Cell cell, PartitionStatisticsCollector collector) { collector.update(cell); if (cell.isCounterCell()) collector.updateHasLegacyCounterShards(CounterCells.hasLegacyShards(cell)); }
private void addMarksForRow(Row row, List<CounterMark> marks) { for (Cell cell : row.cells()) { if (cell.isCounterCell()) marks.add(new CounterMark(row, cell.column(), cell.path())); } }
private void addMarksForRow(Row row, List<CounterMark> marks) { for (Cell cell : row.cells()) { if (cell.isCounterCell()) marks.add(new CounterMark(row, cell.column(), cell.path())); } }
private ByteBuffer value(Cell c) { return c.isCounterCell() ? ByteBufferUtil.bytes(CounterContext.instance().total(c.value())) : c.value(); }
private ByteBuffer value(Cell c) { return c.isCounterCell() ? ByteBufferUtil.bytes(CounterContext.instance().total(c.value())) : c.value(); }
private ByteBuffer value(Cell c) { return c.isCounterCell() ? ByteBufferUtil.bytes(CounterContext.instance().total(c.value())) : c.value(); }
@Override public boolean equals(Object other) { if (this == other) return true; if(!(other instanceof Cell)) return false; Cell that = (Cell)other; return this.column().equals(that.column()) && this.isCounterCell() == that.isCounterCell() && this.timestamp() == that.timestamp() && this.ttl() == that.ttl() && this.localDeletionTime() == that.localDeletionTime() && Objects.equals(this.value(), that.value()) && Objects.equals(this.path(), that.path()); }
@Override public boolean equals(Object other) { if (this == other) return true; if(!(other instanceof Cell)) return false; Cell that = (Cell)other; return this.column().equals(that.column()) && this.isCounterCell() == that.isCounterCell() && this.timestamp() == that.timestamp() && this.ttl() == that.ttl() && this.localDeletionTime() == that.localDeletionTime() && Objects.equals(this.value(), that.value()) && Objects.equals(this.path(), that.path()); }
private static LegacyCell makeLegacyCell(Clustering clustering, Cell cell) { LegacyCell.Kind kind; if (cell.isCounterCell()) kind = LegacyCell.Kind.COUNTER; else if (cell.isTombstone()) kind = LegacyCell.Kind.DELETED; else if (cell.isExpiring()) kind = LegacyCell.Kind.EXPIRING; else kind = LegacyCell.Kind.REGULAR; CellPath path = cell.path(); assert path == null || path.size() == 1; LegacyCellName name = new LegacyCellName(clustering, cell.column(), path == null ? null : path.get(0)); return new LegacyCell(kind, name, cell.value(), cell.timestamp(), cell.localDeletionTime(), cell.ttl()); }
private static LegacyCell makeLegacyCell(Clustering clustering, Cell cell) { LegacyCell.Kind kind; if (cell.isCounterCell()) kind = LegacyCell.Kind.COUNTER; else if (cell.isTombstone()) kind = LegacyCell.Kind.DELETED; else if (cell.isExpiring()) kind = LegacyCell.Kind.EXPIRING; else kind = LegacyCell.Kind.REGULAR; CellPath path = cell.path(); assert path == null || path.size() == 1; LegacyCellName name = new LegacyCellName(clustering, cell.column(), path == null ? null : path.get(0)); return new LegacyCell(kind, name, cell.value(), cell.timestamp(), cell.localDeletionTime(), cell.ttl()); }
private static LegacyCell makeLegacyCell(Clustering clustering, Cell cell) { LegacyCell.Kind kind; if (cell.isCounterCell()) kind = LegacyCell.Kind.COUNTER; else if (cell.isTombstone()) kind = LegacyCell.Kind.DELETED; else if (cell.isExpiring()) kind = LegacyCell.Kind.EXPIRING; else kind = LegacyCell.Kind.REGULAR; CellPath path = cell.path(); assert path == null || path.size() == 1; LegacyCellName name = new LegacyCellName(clustering, cell.column(), path == null ? null : path.get(0)); return new LegacyCell(kind, name, cell.value(), cell.timestamp(), cell.localDeletionTime(), cell.ttl()); }