steveloughran commented on a change in pull request #1842: HADOOP-16730 : ABFS:
Add Authorizer Interface
URL: https://github.com/apache/hadoop/pull/1842#discussion_r378946344
##########
File path:
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsOutputStream.java
##########
@@ -351,14 +358,21 @@ private synchronized void
flushWrittenBytesToServiceInternal(final long offset,
AbfsPerfTracker tracker = client.getAbfsPerfTracker();
try (AbfsPerfInfo perfInfo = new AbfsPerfInfo(tracker,
"flushWrittenBytesToServiceInternal", "flush")) {
- AbfsRestOperation op = client.flush(path, offset, retainUncommitedData,
isClose);
+ AbfsRestOperation op = client.flush(path, offset, retainUncommitedData,
+ isClose, this.authzStatus);
perfInfo.registerResult(op.getResult()).registerSuccess(true);
} catch (AzureBlobFileSystemException ex) {
if (ex instanceof AbfsRestOperationException) {
if (((AbfsRestOperationException) ex).getStatusCode() ==
HttpURLConnection.HTTP_NOT_FOUND) {
throw new FileNotFoundException(ex.getMessage());
}
}
+
+ if ((ex instanceof AbfsAuthorizationException)
Review comment:
this should really be done by separate catch clauses above line 364, e.g.
```
catch(AbfsAuthException | AbfsAuthUnhandledException ex) { throw ex; }
```
----------------------------------------------------------------
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]