use of com.github.ambry.cloud.azure.AzureBlobDataAccessor in project ambry by linkedin.
the class AzureTokenResetTool method main.
public static void main(String[] args) {
String commandName = AzureTokenResetTool.class.getSimpleName();
try {
VerifiableProperties verifiableProperties = ToolUtils.getVerifiableProperties(args);
String clusterName = verifiableProperties.getString(ClusterMapConfig.CLUSTERMAP_CLUSTER_NAME);
CloudConfig cloudConfig = new CloudConfig(verifiableProperties);
AzureCloudConfig azureCloudConfig = new AzureCloudConfig(verifiableProperties);
AzureMetrics azureMetrics = new AzureMetrics(new MetricRegistry());
AzureBlobLayoutStrategy blobLayoutStrategy = new AzureBlobLayoutStrategy(clusterName, azureCloudConfig);
AzureBlobDataAccessor dataAccessor = new AzureBlobDataAccessor(cloudConfig, azureCloudConfig, blobLayoutStrategy, azureMetrics);
storageClient = dataAccessor.getStorageClient();
int tokensDeleted = resetTokens(clusterName);
logger.info("Deleted tokens for {} partitions", tokensDeleted);
} catch (Exception ex) {
ex.printStackTrace();
logger.error("Command {} failed", commandName, ex);
System.exit(1);
}
}
Aggregations