Class Compactor

  • Direct Known Subclasses:
    TwoPhaseCompactor

    public abstract class Compactor
    extends java.lang.Object
    Compactor for Pulsar topics.
    • Constructor Summary

      Constructors 
      Constructor Description
      Compactor​(org.apache.pulsar.broker.ServiceConfiguration conf, org.apache.pulsar.client.api.PulsarClient pulsar, org.apache.bookkeeper.client.BookKeeper bk, java.util.concurrent.ScheduledExecutorService scheduler)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.concurrent.CompletableFuture<java.lang.Long> compact​(java.lang.String topic)  
      protected abstract java.util.concurrent.CompletableFuture<java.lang.Long> doCompaction​(RawReader reader, org.apache.bookkeeper.client.BookKeeper bk)  
      CompactorMXBean getStats()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • COMPACTION_SUBSCRIPTION

        public static final java.lang.String COMPACTION_SUBSCRIPTION
        See Also:
        Constant Field Values
      • COMPACTED_TOPIC_LEDGER_PROPERTY

        public static final java.lang.String COMPACTED_TOPIC_LEDGER_PROPERTY
        See Also:
        Constant Field Values
      • conf

        protected final org.apache.pulsar.broker.ServiceConfiguration conf
      • scheduler

        protected final java.util.concurrent.ScheduledExecutorService scheduler
    • Constructor Detail

      • Compactor

        public Compactor​(org.apache.pulsar.broker.ServiceConfiguration conf,
                         org.apache.pulsar.client.api.PulsarClient pulsar,
                         org.apache.bookkeeper.client.BookKeeper bk,
                         java.util.concurrent.ScheduledExecutorService scheduler)
    • Method Detail

      • compact

        public java.util.concurrent.CompletableFuture<java.lang.Long> compact​(java.lang.String topic)
      • doCompaction

        protected abstract java.util.concurrent.CompletableFuture<java.lang.Long> doCompaction​(RawReader reader,
                                                                                               org.apache.bookkeeper.client.BookKeeper bk)