steveloughran commented on a change in pull request #2731:
URL: https://github.com/apache/hadoop/pull/2731#discussion_r618495982
##########
File path:
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsRestOperation.java
##########
@@ -167,12 +167,30 @@ String getSasToken() {
this.abfsCounters = client.getAbfsCounters();
}
+ /**
+ * Execute a AbfsRestOperation. Track the Duration of a request if
+ * abfsCounters isn't null.
+ *
+ */
+ public void execute() throws AzureBlobFileSystemException {
+
+ try {
+ IOStatisticsBinding.trackDurationOfInvocation(abfsCounters,
+ AbfsStatistic.getStatNameFromHttpCall(method),
+ () -> completeExecute());
+ } catch (AzureBlobFileSystemException aze) {
+ throw aze;
+ } catch (IOException e) {
+ throw new RuntimeException("Error while tracking Duration of an "
Review comment:
change to UncheckedIOException; there's stuff in our functional package
which can unwrap that down to an IOE as we always know the inner fault is a
non-null IOE
--
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]