Class CloudStorageCompactor

  • All Implemented Interfaces:
    java.lang.Runnable

    public class CloudStorageCompactor
    extends java.lang.Object
    implements java.lang.Runnable
    Class that runs scheduled or on-demand compaction of blobs in cloud storage.
    • Constructor Summary

      Constructors 
      Constructor Description
      CloudStorageCompactor​(CloudDestination cloudDestination, com.github.ambry.config.CloudConfig cloudConfig, java.util.Set<com.github.ambry.clustermap.PartitionId> partitions, VcrMetrics vcrMetrics)
      Public constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compactPartitions()
      Purge the inactive blobs in all managed partitions.
      void run()  
      void shutdown()
      Shut down the compactor waiting for in progress operations to complete.
      • Methods inherited from class java.lang.Object

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

      • CloudStorageCompactor

        public CloudStorageCompactor​(CloudDestination cloudDestination,
                                     com.github.ambry.config.CloudConfig cloudConfig,
                                     java.util.Set<com.github.ambry.clustermap.PartitionId> partitions,
                                     VcrMetrics vcrMetrics)
        Public constructor.
        Parameters:
        cloudDestination - the cloud destination to use.
        partitions - the set of partitions to compact.
        vcrMetrics - the metrics to update.
    • Method Detail

      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
      • shutdown

        public void shutdown()
        Shut down the compactor waiting for in progress operations to complete.
      • compactPartitions

        public int compactPartitions()
        Purge the inactive blobs in all managed partitions.
        Returns:
        the total number of blobs purged.