private static SweepResults getCumulativeSweepResults(TableToSweep tableToSweep, SweepResults currentIteration) { return tableToSweep.getPreviousSweepResults().accumulateWith(currentIteration); }
private SweepResults runFullSweepWithoutSavingResults( TableReference tableRef, byte[] startRow, SweepBatchConfig sweepBatchConfig) { SweepResults cumulativeResults = SweepResults.createEmptySweepResult(Optional.of(startRow)); while (cumulativeResults.getNextStartRow().isPresent()) { SweepResults results = runOneBatchWithoutSavingResults( tableRef, cumulativeResults.getNextStartRow().get(), sweepBatchConfig); specificTableSweeper.updateTimeMetricsOneIteration(results.getTimeInMillis(), results.getTimeElapsedSinceStartedSweeping()); cumulativeResults = cumulativeResults.accumulateWith(results); } return cumulativeResults; }
@Test public void accumulateWithNextRowInOrder() { Assert.assertThat(RESULTS.accumulateWith(OTHER_RESULTS), Matchers.equalTo(COMBINED_RESULTS_AND_OTHER)); }
@Test public void accumulateWithNextRowInOppositeOrder() { Assert.assertThat(OTHER_RESULTS.accumulateWith(RESULTS), Matchers.equalTo(COMBINED_RESULTS_AND_OTHER)); }
: sweepRunner.run(tableToSweep, batchConfig, accumulatedResults.getNextStartRow().get()); accumulatedResults = accumulatedResults.accumulateWith(newResults); printer.info( "{} Swept from {} to {} in table {} in {} ms, examined {} cell values,"
private static SweepResults getCumulativeSweepResults(TableToSweep tableToSweep, SweepResults currentIteration) { return tableToSweep.getPreviousSweepResults().accumulateWith(currentIteration); }
private SweepResults runFullSweepWithoutSavingResults( TableReference tableRef, byte[] startRow, SweepBatchConfig sweepBatchConfig) { SweepResults cumulativeResults = SweepResults.createEmptySweepResult(Optional.of(startRow)); while (cumulativeResults.getNextStartRow().isPresent()) { SweepResults results = runOneBatchWithoutSavingResults( tableRef, cumulativeResults.getNextStartRow().get(), sweepBatchConfig); specificTableSweeper.updateTimeMetricsOneIteration(results.getTimeInMillis(), results.getTimeElapsedSinceStartedSweeping()); cumulativeResults = cumulativeResults.accumulateWith(results); } return cumulativeResults; }
: sweepRunner.run(tableToSweep, batchConfig, accumulatedResults.getNextStartRow().get()); accumulatedResults = accumulatedResults.accumulateWith(newResults); printer.info( "{} Swept from {} to {} in table {} in {} ms, examined {} cell values,"