private Map<TableReference, Map<Cell, Long>> writesPerTable(Collection<WriteInfo> writes, Sweeper sweeper) { return writes.stream().collect(Collectors.groupingBy( WriteInfo::tableRef, Collectors.toMap(WriteInfo::cell, write -> write.timestampToDeleteAtExclusive(sweeper)))); } }
@Test public void timestampToDeleteAtHigherForTombstoneAndThorough() { assertThat(getWriteAt(ONE).timestampToDeleteAtExclusive(Sweeper.CONSERVATIVE)).isEqualTo(ONE); assertThat(getWriteAt(ONE).timestampToDeleteAtExclusive(Sweeper.THOROUGH)).isEqualTo(ONE); assertThat(getTombstoneAt(ONE).timestampToDeleteAtExclusive(Sweeper.CONSERVATIVE)).isEqualTo(ONE); assertThat(getTombstoneAt(ONE).timestampToDeleteAtExclusive(Sweeper.THOROUGH)).isEqualTo(TWO); }
private Map<TableReference, Map<Cell, Long>> writesPerTable(Collection<WriteInfo> writes, Sweeper sweeper) { return writes.stream().collect(Collectors.groupingBy( WriteInfo::tableRef, Collectors.toMap(WriteInfo::cell, write -> write.timestampToDeleteAtExclusive(sweeper)))); } }