[ https://issues.apache.org/jira/browse/HADOOP-17670?focusedWorklogId=596656&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-596656 ]
ASF GitHub Bot logged work on HADOOP-17670: ------------------------------------------- Author: ASF GitHub Bot Created on: 14/May/21 13:38 Start Date: 14/May/21 13:38 Worklog Time Spent: 10m Work Description: steveloughran commented on a change in pull request #2963: URL: https://github.com/apache/hadoop/pull/2963#discussion_r632532149 ########## File path: hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/statistics/IOStatisticsLogging.java ########## @@ -249,6 +250,26 @@ public static void logIOStatisticsAtDebug( logIOStatisticsAtDebug(LOG, message, source); } + /** + * A method to log IOStatistics from a source. + * + * @param log Logger for logging. + * @param level LOG level. + * @param source Source to LOG. + */ + public static void loggingIOStatistics(Logger log, String level, Review comment: use a name like `logIOStatisticsAtLevel()` ########## File path: hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsOutputStream.java ########## @@ -331,7 +331,7 @@ public synchronized void close() throws IOException { } } if (LOG.isDebugEnabled()) { - LOG.debug("Closing AbfsOutputStream ", toString()); + LOG.debug("Closing AbfsOutputStream : {}", toString()); Review comment: switch to `LOG.debug("Closing AbfsOutputStream : {}", this)` and you can then remove the is debug enabled check. ########## File path: hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystem.java ########## @@ -490,7 +489,12 @@ public synchronized void close() throws IOException { // does all the delete-on-exit calls, and may be slow. super.close(); LOG.debug("AzureBlobFileSystem.close"); - IOUtils.cleanupWithLogger(LOG, abfsStore, delegationTokenManager); + if (getConf() != null) { + String iostatisticsLoggingLevel = + this.getConf().getTrimmed(IOSTATISTICS_LOGGING_LEVEL, Review comment: nit: remove `this.` ########## File path: hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/statistics/IOStatisticsLogging.java ########## @@ -249,6 +250,26 @@ public static void logIOStatisticsAtDebug( logIOStatisticsAtDebug(LOG, message, source); } + /** + * A method to log IOStatistics from a source. + * + * @param log Logger for logging. + * @param level LOG level. + * @param source Source to LOG. + */ + public static void loggingIOStatistics(Logger log, String level, + Object source) { + if (level.toLowerCase().equals(IOSTATISTICS_LOGGING_LEVEL_INFO)) { Review comment: proposed: use a switch() and support error and warn too; the lower case locale must be in EN_US. (trivia: the code as is won't work in turkey). -- 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 596656) Time Spent: 0.5h (was: 20m) > S3AFS and ABFS to log IOStats at DEBUG mode or optionally at INFO level in > close() > ---------------------------------------------------------------------------------- > > Key: HADOOP-17670 > URL: https://issues.apache.org/jira/browse/HADOOP-17670 > Project: Hadoop Common > Issue Type: Sub-task > Reporter: Mehakmeet Singh > Assignee: Mehakmeet Singh > Priority: Major > Labels: pull-request-available > Time Spent: 0.5h > Remaining Estimate: 0h > > Adding a property to log IOStats in close() for S3AFS and ABFS at DEBUG level > by default or optionally at INFO level. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org