private Set<RangeRequest> rangeRequestsIfDedicated(SweepableCellsTable.SweepableCellsRow row, SweepableCellsTable.SweepableCellsColumn col) { if (!isReferenceToDedicatedRows(col)) { return ImmutableSet.of(); } return computeDedicatedRows(row, col).stream() .map(SweepableCellsRow::persistToBytes) .map(bytes -> computeRangeRequestForRows(bytes, bytes)) .collect(Collectors.toSet()); }
private WriteBatch writesFromDedicated(SweepableCellsRow row, SweepableCellsTable.SweepableCellsColumn col) { List<SweepableCellsRow> dedicatedRows = computeDedicatedRows(row, col); RowColumnRangeIterator iterator = getWithColumnRangeAll( Lists.transform(dedicatedRows, SweepableCellsRow::persistToBytes)); WriteBatch batch = new WriteBatch(); return batch.add(dedicatedRows, Streams.stream(iterator) .map(entry -> getWriteInfo(getTimestamp(row, col), entry.getValue())) .collect(Collectors.toList())); }
private Set<RangeRequest> rangeRequestsIfDedicated(SweepableCellsTable.SweepableCellsRow row, SweepableCellsTable.SweepableCellsColumn col) { if (!isReferenceToDedicatedRows(col)) { return ImmutableSet.of(); } return computeDedicatedRows(row, col).stream() .map(SweepableCellsRow::persistToBytes) .map(bytes -> computeRangeRequestForRows(bytes, bytes)) .collect(Collectors.toSet()); }
private WriteBatch writesFromDedicated(SweepableCellsRow row, SweepableCellsTable.SweepableCellsColumn col) { List<SweepableCellsRow> dedicatedRows = computeDedicatedRows(row, col); RowColumnRangeIterator iterator = getWithColumnRangeAll( Lists.transform(dedicatedRows, SweepableCellsRow::persistToBytes)); WriteBatch batch = new WriteBatch(); return batch.add(dedicatedRows, Streams.stream(iterator) .map(entry -> getWriteInfo(getTimestamp(row, col), entry.getValue())) .collect(Collectors.toList())); }