Package com.github.ambry.cloud.azure
Class AzureStorageCompactor
- java.lang.Object
-
- com.github.ambry.cloud.azure.AzureStorageCompactor
-
public class AzureStorageCompactor extends java.lang.Object
Class that compacts partitions in the Azure cloud by purging inactive blobs from ABS and Cosmos.
-
-
Constructor Summary
Constructors Constructor Description AzureStorageCompactor(AzureBlobDataAccessor azureBlobDataAccessor, CosmosDataAccessor cosmosDataAccessor, com.github.ambry.config.CloudConfig cloudConfig, VcrMetrics vcrMetrics, AzureMetrics azureMetrics)
Public constructor.
-
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.
-
-
-
Constructor Detail
-
AzureStorageCompactor
public AzureStorageCompactor(AzureBlobDataAccessor azureBlobDataAccessor, CosmosDataAccessor cosmosDataAccessor, com.github.ambry.config.CloudConfig cloudConfig, VcrMetrics vcrMetrics, AzureMetrics azureMetrics)
Public constructor.- Parameters:
azureBlobDataAccessor
- theAzureBlobDataAccessor
to use.cosmosDataAccessor
- theCosmosDataAccessor
to use.cloudConfig
- theCloudConfig
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.
-
-