Package com.github.ambry.cloud.azure
Class AzureBlobLayoutStrategy
- java.lang.Object
-
- com.github.ambry.cloud.azure.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 twoAzureCloudConfig
properties:- nameSchemeVersion: version of the translation scheme for blob names.
- blobContainerStrategy: strategy for organizing Azure containers.
-
-
Constructor Summary
Constructors Constructor Description AzureBlobLayoutStrategy(java.lang.String clusterName)
Test constructorAzureBlobLayoutStrategy(java.lang.String clusterName, AzureCloudConfig azureCloudConfig)
Constuctor forAzureBlobLayoutStrategy
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.github.ambry.cloud.azure.AzureBlobLayoutStrategy.BlobLayout
getDataBlobLayout(CloudBlobMetadata blobMetadata)
com.github.ambry.cloud.azure.AzureBlobLayoutStrategy.BlobLayout
getDataBlobLayout(com.github.ambry.commons.BlobId blobId)
com.github.ambry.cloud.azure.AzureBlobLayoutStrategy.BlobLayout
getTokenBlobLayout(java.lang.String partitionPath, java.lang.String tokenFileName)
-
-
-
Constructor Detail
-
AzureBlobLayoutStrategy
public AzureBlobLayoutStrategy(java.lang.String clusterName, AzureCloudConfig azureCloudConfig)
Constuctor forAzureBlobLayoutStrategy
.- Parameters:
clusterName
- Name of the Ambry cluster.azureCloudConfig
- TheAzureCloudConfig
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
- theCloudBlobMetadata
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.
-
-