jfrazee commented on a change in pull request #4430:
URL: https://github.com/apache/nifi/pull/4430#discussion_r463196544



##########
File path: 
nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/storage/utils/AzureStorageUtils.java
##########
@@ -146,24 +142,46 @@ private AzureStorageUtils() {
     }
 
     /**
-     * Create CloudBlobClient instance.
+     * Create BlobServiceClient instance.
      * @param flowFile An incoming FlowFile can be used for NiFi Expression 
Language evaluation to derive
      *                 Account Name, Account Key or SAS Token. This can be 
null if not available.
      */
-    public static CloudBlobClient createCloudBlobClient(ProcessContext 
context, ComponentLog logger, FlowFile flowFile) throws URISyntaxException {
+    public static BlobServiceClient createBlobServiceClient(PropertyContext 
context, FlowFile flowFile) {
         final AzureStorageCredentialsDetails storageCredentialsDetails = 
getStorageCredentialsDetails(context, flowFile);
-        final CloudStorageAccount cloudStorageAccount = new 
CloudStorageAccount(
-            storageCredentialsDetails.getStorageCredentials(),
-            true,
-            storageCredentialsDetails.getStorageSuffix(),
-            storageCredentialsDetails.getStorageAccountName());
-        final CloudBlobClient cloudBlobClient = 
cloudStorageAccount.createCloudBlobClient();
-
-        return cloudBlobClient;
+
+        final String storageSuffix = 
StringUtils.isNotBlank(storageCredentialsDetails.getStorageSuffix())
+            ? storageCredentialsDetails.getStorageSuffix()
+            : "blob.core.windows.net";

Review comment:
       I think the API does the right thing if this is null. So defaulting it 
might be unnecessary anyway.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to