-
Notifications
You must be signed in to change notification settings - Fork 9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HADOOP-19471. ABFS: Support Fixed SAS Token at Container Level #7461
base: trunk
Are you sure you want to change the base?
Conversation
💔 -1 overall
This message was automatically generated. |
c5b14bb
to
4a182ac
Compare
🎊 +1 overall
This message was automatically generated. |
passchars = rawConfig.getPassword(accountConf(key)); | ||
if(passchars == null){ | ||
passchars = rawConfig.getPassword(key); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be simplified as :- char[] passchars = rawConfig.getPassword(containerConf(key)) != null ?
rawConfig.getPassword(containerConf(key)) :
rawConfig.getPassword(accountConf(key)) != null ?
rawConfig.getPassword(accountConf(key)) :
rawConfig.getPassword(key);
@@ -493,7 +497,7 @@ public AbfsConfiguration(final Configuration rawConfig, | |||
*/ | |||
public AbfsConfiguration(final Configuration rawConfig, String accountName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally we should add a separate constructor with this new param
* Helper method to get the Fixed SAS token value | ||
*/ | ||
private String getFixedSASToken(AbfsConfiguration config) throws Exception { | ||
return config.getSASTokenProvider().getSASToken(this.getAccountName(), this.getFileSystemName(), getMethodName(), "read"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: use constants for string
🎊 +1 overall
This message was automatically generated. |
Test Results============================================================
|
Description of PR
The ABFS driver currently lacks support for multiple SAS tokens for the same storage account across different containers.
Introducing this support through this PR.
To use fixed SAS token at container level the configuration to be used is:
fs.azure.sas.fixed.token.<container-name>.<storage-account-name>
How was this patch tested?
Adding the test results in the comments below.