surendralilhore commented on a change in pull request #2549:
URL: https://github.com/apache/hadoop/pull/2549#discussion_r614609260
##########
File path:
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystem.java
##########
@@ -393,6 +397,32 @@ public boolean delete(final Path f, final boolean
recursive) throws IOException
}
+ /**
+ * Returns a ContentSummary instance containing the count of directories,
+ * files and total number of bytes under a given path
+ * @param path The given path
+ * @return ContentSummary
+ * @throws IOException if an error is encountered during listStatus calls
+ * or if there is any issue with the thread pool used while processing
+ */
+ @Override
+ public ContentSummary getContentSummary(Path path) throws IOException {
+ try {
+ ABFSContentSummary contentSummary =
+ (new ContentSummaryProcessor(abfsStore)).getContentSummary(path);
+ return new Builder().length(contentSummary.getLength())
+ .directoryCount(contentSummary.getDirectoryCount())
+ .fileCount(contentSummary.getFileCount())
+ .spaceConsumed(contentSummary.getSpaceConsumed()).build();
+ } catch (InterruptedException e) {
+ LOG.debug("Thread interrupted");
+ throw new IOException(e);
+ } catch(ExecutionException ex) {
+ LOG.debug(ex.getCause().getMessage());
Review comment:
Add some detail like "GetContentSummary failed with error"
--
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]