steveloughran commented on a change in pull request #2141:
URL: https://github.com/apache/hadoop/pull/2141#discussion_r455039221
##########
File path:
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/SimpleKeyProvider.java
##########
@@ -20,13 +20,15 @@
import java.io.IOException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.azurebfs.AbfsConfiguration;
import org.apache.hadoop.fs.azurebfs.constants.ConfigurationKeys;
import org.apache.hadoop.fs.azurebfs.contracts.exceptions.KeyProviderException;
import
org.apache.hadoop.fs.azurebfs.contracts.exceptions.InvalidConfigurationValueException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
Review comment:
leave imports alone once they are in; otherwise backporting is a mess
##########
File path:
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/SimpleKeyProvider.java
##########
@@ -49,6 +51,27 @@ public String getStorageAccountKey(String accountName,
Configuration rawConfig)
LOG.warn("Unable to get key from credential providers. {}", ioe);
}
+ // Validating the key.
+ try {
+ validateStorageAccountKey(key);
+ } catch (InvalidConfigurationValueException e) {
+ e.printStackTrace();
Review comment:
Throw it; we want to fail fast rather than wait for auth failures
talking to the far end.
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]