private Map<Sha256Hash, Integer> getColumnCounts(TableReference tableRef, List<byte[]> rowList, ColumnRangeSelection columnRangeSelection, long timestamp) { Map<Sha256Hash, Integer> countsByRow = batchingQueryRunner.runTask( rowList, BatchingStrategies.forList(), AccumulatorStrategies.forMap(), partition -> getColumnCountsUnordered(tableRef, partition, columnRangeSelection, timestamp)); // Make iteration order of the returned map match the provided list. Map<Sha256Hash, Integer> ordered = new LinkedHashMap<>(countsByRow.size()); for (byte[] row : rowList) { Sha256Hash rowHash = Sha256Hash.computeHash(row); ordered.put(rowHash, countsByRow.getOrDefault(rowHash, 0)); } return ordered; }
private Map<Sha256Hash, Integer> getColumnCounts(TableReference tableRef, List<byte[]> rowList, ColumnRangeSelection columnRangeSelection, long timestamp) { Map<Sha256Hash, Integer> countsByRow = batchingQueryRunner.runTask( rowList, BatchingStrategies.forList(), AccumulatorStrategies.forMap(), partition -> getColumnCountsUnordered(tableRef, partition, columnRangeSelection, timestamp)); // Make iteration order of the returned map match the provided list. Map<Sha256Hash, Integer> ordered = new LinkedHashMap<>(countsByRow.size()); for (byte[] row : rowList) { Sha256Hash rowHash = Sha256Hash.computeHash(row); ordered.put(rowHash, countsByRow.getOrDefault(rowHash, 0)); } return ordered; }