Class AzureStorageCompactor


  • public class AzureStorageCompactor
    extends java.lang.Object
    Class that compacts partitions in the Azure cloud by purging inactive blobs from ABS and Cosmos.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compactPartition​(java.lang.String partitionPath)
      Purge the inactive blobs in the specified partition.
      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

      • AzureStorageCompactor

        public AzureStorageCompactor​(AzureBlobDataAccessor azureBlobDataAccessor,
                                     CosmosDataAccessor cosmosDataAccessor,
                                     com.github.ambry.config.CloudConfig cloudConfig,
                                     VcrMetrics vcrMetrics,
                                     AzureMetrics azureMetrics)
        Public constructor.
        Parameters:
        azureBlobDataAccessor - the AzureBlobDataAccessor to use.
        cosmosDataAccessor - the CosmosDataAccessor to use.
        cloudConfig - the CloudConfig to use.
        vcrMetrics - the VCR metrics to update.
        azureMetrics - the Azure metrics to update.
    • Method Detail

      • shutdown

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

        public int compactPartition​(java.lang.String partitionPath)
                             throws CloudStorageException
        Purge the inactive blobs in the specified partition.
        Returns:
        the total number of blobs purged.
        Throws:
        CloudStorageException - if the compaction fails.