@Value.Check void allowOnlyConservativeAndThorough() { Preconditions.checkArgument(isConservative() || isThorough(), "Sweep strategy should be CONSERVATIVE or " + "THOROUGH, but it is %s instead.", strategy()); }
private byte[] computeRowBytes(ShardAndStrategy shardStrategy, long coarsePartition) { SweepableTimestampsTable.SweepableTimestampsRow row = SweepableTimestampsTable.SweepableTimestampsRow.of( shardStrategy.shard(), coarsePartition, PersistableBoolean.of(shardStrategy.isConservative()).persistToBytes()); return row.persistToBytes(); }
private Cell cellForShard(ShardAndStrategy shardAndStrategy) { SweepShardProgressTable.SweepShardProgressRow row = SweepShardProgressTable.SweepShardProgressRow.of( shardAndStrategy.shard(), PersistableBoolean.of(shardAndStrategy.isConservative()).persistToBytes()); return Cell.create(row.persistToBytes(), SweepShardProgressTable.SweepShardProgressNamedColumn.VALUE.getShortName()); }
private SweepableCellsRow computeRow(long partitionFine, ShardAndStrategy shardStrategy) { TargetedSweepMetadata metadata = ImmutableTargetedSweepMetadata.builder() .conservative(shardStrategy.isConservative()) .dedicatedRow(false) .shard(shardStrategy.shard()) .dedicatedRowNumber(0) .build(); return SweepableCellsRow.of(partitionFine, metadata.persistToBytes()); }
@Value.Check void allowOnlyConservativeAndThorough() { Preconditions.checkArgument(isConservative() || isThorough(), "Sweep strategy should be CONSERVATIVE or " + "THOROUGH, but it is %s instead.", strategy()); }
private byte[] computeRowBytes(ShardAndStrategy shardStrategy, long coarsePartition) { SweepableTimestampsTable.SweepableTimestampsRow row = SweepableTimestampsTable.SweepableTimestampsRow.of( shardStrategy.shard(), coarsePartition, PersistableBoolean.of(shardStrategy.isConservative()).persistToBytes()); return row.persistToBytes(); }
private Cell cellForShard(ShardAndStrategy shardAndStrategy) { SweepShardProgressTable.SweepShardProgressRow row = SweepShardProgressTable.SweepShardProgressRow.of( shardAndStrategy.shard(), PersistableBoolean.of(shardAndStrategy.isConservative()).persistToBytes()); return Cell.create(row.persistToBytes(), SweepShardProgressTable.SweepShardProgressNamedColumn.VALUE.getShortName()); }
private SweepableCellsRow computeRow(long partitionFine, ShardAndStrategy shardStrategy) { TargetedSweepMetadata metadata = ImmutableTargetedSweepMetadata.builder() .conservative(shardStrategy.isConservative()) .dedicatedRow(false) .shard(shardStrategy.shard()) .dedicatedRowNumber(0) .build(); return SweepableCellsRow.of(partitionFine, metadata.persistToBytes()); }