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.
COMPACTION_SUBSCRIPTION, conf, mxBean, 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) |
long |
getPhaseOneLoopReadTimeoutInSeconds() |
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 Compactorpublic long getPhaseOneLoopReadTimeoutInSeconds()
Copyright © 2017–2022 Apache Software Foundation. All rights reserved.