You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by xi...@apache.org on 2022/11/25 20:41:55 UTC

[pinot] branch master updated: Adding new ADLSPinotFS auth type: DEFAULT (#9860)

This is an automated email from the ASF dual-hosted git repository.

xiangfu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new aa839c97b5 Adding new ADLSPinotFS auth type: DEFAULT (#9860)
aa839c97b5 is described below

commit aa839c97b5eb2efc41842b63421b392e1450546b
Author: Xiang Fu <xi...@gmail.com>
AuthorDate: Fri Nov 25 12:41:48 2022 -0800

    Adding new ADLSPinotFS auth type: DEFAULT (#9860)
---
 .../apache/pinot/plugin/filesystem/ADLSGen2PinotFS.java  | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/pinot-plugins/pinot-file-system/pinot-adls/src/main/java/org/apache/pinot/plugin/filesystem/ADLSGen2PinotFS.java b/pinot-plugins/pinot-file-system/pinot-adls/src/main/java/org/apache/pinot/plugin/filesystem/ADLSGen2PinotFS.java
index 52991c35c3..ceed39af67 100644
--- a/pinot-plugins/pinot-file-system/pinot-adls/src/main/java/org/apache/pinot/plugin/filesystem/ADLSGen2PinotFS.java
+++ b/pinot-plugins/pinot-file-system/pinot-adls/src/main/java/org/apache/pinot/plugin/filesystem/ADLSGen2PinotFS.java
@@ -74,7 +74,7 @@ public class ADLSGen2PinotFS extends BasePinotFS {
   private static final Logger LOGGER = LoggerFactory.getLogger(ADLSGen2PinotFS.class);
 
   private enum AuthenticationType {
-    ACCESS_KEY, AZURE_AD, AZURE_AD_WITH_PROXY, ANONYMOUS_ACCESS
+    ACCESS_KEY, AZURE_AD, AZURE_AD_WITH_PROXY, ANONYMOUS_ACCESS, DEFAULT
   }
 
   private static final String AUTHENTICATION_TYPE = "authenticationType";
@@ -189,11 +189,7 @@ public class ADLSGen2PinotFS extends BasePinotFS {
         dataLakeServiceClientBuilder.credential(clientSecretCredentialBuilder.build());
         break;
       }
-      case ANONYMOUS_ACCESS: {
-        LOGGER.info("Authenticating using anonymous access");
-        break;
-      }
-      default: {
+      case DEFAULT: {
         LOGGER.info("Authenticating using Azure default credential");
         DefaultAzureCredentialBuilder defaultAzureCredentialBuilder = new DefaultAzureCredentialBuilder();
         if (tenantId != null) {
@@ -211,6 +207,14 @@ public class ADLSGen2PinotFS extends BasePinotFS {
         dataLakeServiceClientBuilder.credential(defaultAzureCredentialBuilder.build());
         break;
       }
+      case ANONYMOUS_ACCESS: {
+        LOGGER.info("Authenticating using anonymous access");
+        break;
+      }
+      default: {
+        // Should never reach here
+        throw new IllegalStateException("Unexpected authType: " + authType);
+      }
     }
 
     DataLakeServiceClient serviceClient = dataLakeServiceClientBuilder.buildClient();


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org