Source:
<code>void setupAzureContainer(String accountName, String accountKey) { try { StorageSharedKeyCredential credential = new StorageSharedKeyCredential(accountName, accountKey); HttpClient httpClient; if (config.getUseProxy(systemName)) { LOG.info("HTTP Proxy setup for AzureBlob pipeline"); httpClient = new NettyAsyncHttpClientBuilder() .proxy(new ProxyOptions(ProxyOptions.Type.HTTP, new InetSocketAddress(config.getAzureProxyHostname(systemName), config.getAzureProxyPort(systemName)))).build(); } else { httpClient = HttpClient.createDefault(); } String endpoint = String.format(Locale.ROOT, AZURE_URL, accountName); HttpLogOptions httpLogOptions = new HttpLogOptions(); httpLogOptions.setLogLevel(HttpLogDetailLevel.BASIC); BlobServiceAsyncClient storageClient = new BlobServiceClientBuilder() .httpLogOptions(httpLogOptions) .endpoint(endpoint) .credential(credential) .httpClient(httpClient) .buildAsyncClient(); SkuName accountType = storageClient.getAccountInfo().block().getSkuName(); long flushThresholdSize = config.getMaxFlushThresholdSize(systemName); boolean isPremiumAccount = SkuName.PREMIUM_LRS == accountType; if (isPremiumAccount && flushThresholdSize > PREMIUM_MAX_BLOCK_SIZE) { throw new SystemProducerException("Azure storage account with name: " + accountName <START> + " is a premium account and can only handle upto 100MB threshold size. Given flush threshold size is " + flushThresholdSize); } else if (!isPremiumAccount && flushThresholdSize > STANDARD_MAX_BLOCK_SIZE) { throw new SystemProducerException("Azure storage account with name: " + accountName + " is a standard account and can only handle upto 4MB threshold size. Given flush threshold size is " <END> + flushThresholdSize); } containerAsyncClient = storageClient.getBlobContainerAsyncClient(systemName); createContainerIfNotExists(containerAsyncClient); } catch (Exception e) { metrics.updateAzureContainerMetrics(); throw new SystemProducerException("Failed to set up Azure container for SystemName: " + systemName, e); } }</code><technical_language>100MB 4MB changed PREMIUM_MAX_BLOCK_SIZE STANDARD_MAX_BLOCK_SIZE? Then, if changes max block size constants, log messages updated automatically</technical_language>

Target:
void setupAzureContainer(String accountName, String accountKey) { try { StorageSharedKeyCredential credential = new StorageSharedKeyCredential(accountName, accountKey); HttpClient httpClient; if (config.getUseProxy(systemName)) { LOG.info("HTTP Proxy setup for AzureBlob pipeline"); httpClient = new NettyAsyncHttpClientBuilder() .proxy(new ProxyOptions(ProxyOptions.Type.HTTP, new InetSocketAddress(config.getAzureProxyHostname(systemName), config.getAzureProxyPort(systemName)))).build(); } else { httpClient = HttpClient.createDefault(); } String endpoint = String.format(Locale.ROOT, AZURE_URL, accountName); HttpLogOptions httpLogOptions = new HttpLogOptions(); httpLogOptions.setLogLevel(HttpLogDetailLevel.BASIC); BlobServiceAsyncClient storageClient = new BlobServiceClientBuilder() .httpLogOptions(httpLogOptions) .endpoint(endpoint) .credential(credential) .httpClient(httpClient) .buildAsyncClient(); SkuName accountType = storageClient.getAccountInfo().block().getSkuName(); long flushThresholdSize = config.getMaxFlushThresholdSize(systemName); boolean isPremiumAccount = SkuName.PREMIUM_LRS == accountType; if (isPremiumAccount && flushThresholdSize > PREMIUM_MAX_BLOCK_SIZE) { throw new SystemProducerException("Azure storage account with name: " + accountName + " is a premium account and can only handle upto " + PREMIUM_MAX_BLOCK_SIZE + " threshold size. Given flush threshold size is " + flushThresholdSize); } else if (!isPremiumAccount && flushThresholdSize > STANDARD_MAX_BLOCK_SIZE) { throw new SystemProducerException("Azure storage account with name: " + accountName + " is a standard account and can only handle upto " + STANDARD_MAX_BLOCK_SIZE + " threshold size. Given flush threshold size is " + flushThresholdSize); } containerAsyncClient = storageClient.getBlobContainerAsyncClient(systemName); createContainerIfNotExists(containerAsyncClient); } catch (Exception e) { metrics.updateAzureContainerMetrics(); throw new SystemProducerException("Failed to set up Azure container for SystemName: " + systemName, e); } }