vvivekiyer commented on code in PR #8654: URL: https://github.com/apache/pinot/pull/8654#discussion_r869448335
########## pinot-plugins/pinot-file-system/pinot-adls/src/main/java/org/apache/pinot/plugin/filesystem/ADLSGen2PinotFS.java: ########## @@ -128,21 +148,54 @@ public void init(PinotConfiguration config) { new DataLakeServiceClientBuilder().endpoint(dfsServiceEndpointUrl); BlobServiceClientBuilder blobServiceClientBuilder = new BlobServiceClientBuilder().endpoint(blobServiceEndpointUrl); - if (accountName != null && accessKey != null) { - LOGGER.info("Authenticating using the access key to the account."); - StorageSharedKeyCredential sharedKeyCredential = new StorageSharedKeyCredential(accountName, accessKey); - dataLakeServiceClientBuilder.credential(sharedKeyCredential); - blobServiceClientBuilder.credential(sharedKeyCredential); - } else if (clientId != null && clientSecret != null && tenantId != null) { - LOGGER.info("Authenticating using Azure Active Directory"); - ClientSecretCredential clientSecretCredential = - new ClientSecretCredentialBuilder().clientId(clientId).clientSecret(clientSecret).tenantId(tenantId).build(); - dataLakeServiceClientBuilder.credential(clientSecretCredential); - blobServiceClientBuilder.credential(clientSecretCredential); - } else { - // Error out as at least one mode of auth info needed - throw new IllegalArgumentException( - "Expecting either (accountName, accessKey) or (clientId, clientSecret, tenantId)"); + switch (authType) { + case ACCESS_KEY: { + LOGGER.info("Authenticating using the access key to the account."); + Preconditions.checkNotNull(accountName, "Account Name cannot be null"); Review Comment: Doesn't look like it. We don't seem to be using the accountName anywhere else. -- 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. To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org