public class TwoPhaseCompactor extends Compactor
The two passes are required to avoid holding the payloads of each of the latest values in memory, as the payload can be many orders of magnitude larger than a message id.
| Modifier and Type | Field and Description |
|---|---|
static Duration |
PHASE_ONE_LOOP_READ_TIMEOUT |
COMPACTION_SUBSCRIPTION, conf, scheduler| Constructor and Description |
|---|
TwoPhaseCompactor(ServiceConfiguration conf,
org.apache.pulsar.client.api.PulsarClient pulsar,
BookKeeper bk,
ScheduledExecutorService scheduler) |
| Modifier and Type | Method and Description |
|---|---|
protected CompletableFuture<Long> |
doCompaction(RawReader reader,
BookKeeper bk) |
public static final Duration PHASE_ONE_LOOP_READ_TIMEOUT
public TwoPhaseCompactor(ServiceConfiguration conf, org.apache.pulsar.client.api.PulsarClient pulsar, BookKeeper bk, ScheduledExecutorService scheduler)
protected CompletableFuture<Long> doCompaction(RawReader reader, BookKeeper bk)
doCompaction in class CompactorCopyright © 2017–2021 Apache Software Foundation. All rights reserved.