Class AzureBlobLayoutStrategy


  • public class AzureBlobLayoutStrategy
    extends java.lang.Object
    Strategy class that decides where Ambry blobs and tokens are stored in the Azure storage. The decision is governed by two AzureCloudConfig properties:
    1. nameSchemeVersion: version of the translation scheme for blob names.
    2. blobContainerStrategy: strategy for organizing Azure containers.
    • Constructor Detail

      • AzureBlobLayoutStrategy

        public AzureBlobLayoutStrategy​(java.lang.String clusterName,
                                       AzureCloudConfig azureCloudConfig)
        Constuctor for AzureBlobLayoutStrategy.
        Parameters:
        clusterName - Name of the Ambry cluster.
        azureCloudConfig - The AzureCloudConfig to use.
        Throws:
        java.lang.IllegalArgumentException - if invalid config properties are present.
      • AzureBlobLayoutStrategy

        public AzureBlobLayoutStrategy​(java.lang.String clusterName)
        Test constructor
    • Method Detail

      • getDataBlobLayout

        public com.github.ambry.cloud.azure.AzureBlobLayoutStrategy.BlobLayout getDataBlobLayout​(CloudBlobMetadata blobMetadata)
        Parameters:
        blobMetadata - the CloudBlobMetadata for the data blob.
        Returns:
        the AzureBlobLayoutStrategy.BlobLayout for the specified blob.
      • getDataBlobLayout

        public com.github.ambry.cloud.azure.AzureBlobLayoutStrategy.BlobLayout getDataBlobLayout​(com.github.ambry.commons.BlobId blobId)
        Parameters:
        blobId - the id of the blob.
        Returns:
        the AzureBlobLayoutStrategy.BlobLayout for the specified blob.
      • getTokenBlobLayout

        public com.github.ambry.cloud.azure.AzureBlobLayoutStrategy.BlobLayout getTokenBlobLayout​(java.lang.String partitionPath,
                                                                                                  java.lang.String tokenFileName)
        Parameters:
        partitionPath - the lexical partitionId name.
        tokenFileName - the name of the token file to store.
        Returns:
        the AzureBlobLayoutStrategy.BlobLayout for token files in the specified partition.