in modules/azure-ext/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/azure/TcpDiscoveryAzureBlobStoreIpFinder.java [248:292]
private void init() throws IgniteSpiException {
if (initGuard.compareAndSet(false, true)) {
if (accountKey == null || accountName == null || containerName == null || endPoint == null) {
throw new IgniteSpiException(
"One or more of the required parameters is not set [accountName=" +
accountName + ", accountKey=" + accountKey + ", containerName=" +
containerName + ", endPoint=" + endPoint + "]");
}
try {
credential = new StorageSharedKeyCredential(accountName, accountKey);
blobServiceClient = new BlobServiceClientBuilder().endpoint(endPoint).credential(credential).buildClient();
blobContainerClient = blobServiceClient.getBlobContainerClient(containerName);
if (!blobContainerClient.exists()) {
U.warn(log, "Container doesn't exist, will create it [containerName=" + containerName + "]");
blobContainerClient.create();
}
}
finally {
initLatch.countDown();
}
}
else {
try {
U.await(initLatch);
}
catch (IgniteInterruptedCheckedException e) {
throw new IgniteSpiException("Thread has been interrupted.", e);
}
try {
if (!blobContainerClient.exists())
throw new IgniteSpiException("IpFinder has not been initialized properly");
}
catch (Exception e) {
// Check if this is a nested exception wrapping an InterruptedException
// https://github.com/Azure/azure-sdk-for-java/issues/20551
if (!(e.getCause() instanceof InterruptedException)) {
throw e;
}
}
}
}