steveloughran commented on a change in pull request #1842: HADOOP-16730 : ABFS:
Add Authorizer Interface
URL: https://github.com/apache/hadoop/pull/1842#discussion_r382644337
##########
File path:
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsClient.java
##########
@@ -550,6 +631,17 @@ public AbfsRestOperation checkAccess(String path, String
rwx)
return op;
}
+ private void appendSASTokenToQuery(String path, String operation,
AbfsUriQueryBuilder queryBuilder) throws SASTokenProviderException {
+ try {
+ LOG.trace("Fetch SAS token for {}", path);
+ String sasToken = sasTokenProvider.getSASToken(this.accountName,
this.filesystem, path, operation);
+ queryBuilder.setSASToken(sasToken);
+ LOG.trace("SAS token fetch complete for {}", path);
+ } catch (Exception ex) {
+ throw new SASTokenProviderException("Failed to acquire a SAS token.",
ex);
Review comment:
Always preserve/add as much to the error string as you can. Especially as
its all too easy for nested exceptions to not get logged on deep enough chains
(i.e. hive)
add path and token to exception text, as well as ex.toString().
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]