hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [hadoop] steveloughran commented on a change in pull request #1611: HADOOP-16612 Track Azure Blob File System client-perceived latency
Date Thu, 31 Oct 2019 17:27:58 GMT
steveloughran commented on a change in pull request #1611: HADOOP-16612 Track Azure Blob File
System client-perceived latency
URL: https://github.com/apache/hadoop/pull/1611#discussion_r341271372
 
 

 ##########
 File path: hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java
 ##########
 @@ -265,182 +264,223 @@ public AbfsConfiguration getAbfsConfiguration() {
   }
 
   public Hashtable<String, String> getFilesystemProperties() throws AzureBlobFileSystemException
{
-    LOG.debug("getFilesystemProperties for filesystem: {}",
-            client.getFileSystem());
+    try (AbfsPerfInfo tracker = startTracking("getFilesystemProperties", "getFilesystemProperties"))
{
+      LOG.debug("getFilesystemProperties for filesystem: {}",
+              client.getFileSystem());
+
+      final Hashtable<String, String> parsedXmsProperties;
 
-    final Hashtable<String, String> parsedXmsProperties;
+      final AbfsRestOperation op = client.getFilesystemProperties();
+      tracker.registerResult(op.getResult());
 
-    final AbfsRestOperation op = client.getFilesystemProperties();
-    final String xMsProperties = op.getResult().getResponseHeader(HttpHeaderConfigurations.X_MS_PROPERTIES);
+      final String xMsProperties = op.getResult().getResponseHeader(HttpHeaderConfigurations.X_MS_PROPERTIES);
 
-    parsedXmsProperties = parseCommaSeparatedXmsProperties(xMsProperties);
+      parsedXmsProperties = parseCommaSeparatedXmsProperties(xMsProperties);
+      tracker.registerSuccess(true);
 
-    return parsedXmsProperties;
+      return parsedXmsProperties;
+    }
   }
 
   public void setFilesystemProperties(final Hashtable<String, String> properties)
       throws AzureBlobFileSystemException {
-    if (properties == null || properties.isEmpty()) {
-      return;
-    }
+    try (AbfsPerfInfo tracker = startTracking("setFilesystemProperties", "setFilesystemProperties"))
{
+      if (properties == null || properties.isEmpty()) {
+        return;
+      }
 
-    LOG.debug("setFilesystemProperties for filesystem: {} with properties: {}",
-            client.getFileSystem(),
-            properties);
+      LOG.debug("setFilesystemProperties for filesystem: {} with properties: {}",
+              client.getFileSystem(),
+              properties);
 
-    final String commaSeparatedProperties;
-    try {
-      commaSeparatedProperties = convertXmsPropertiesToCommaSeparatedString(properties);
-    } catch (CharacterCodingException ex) {
-      throw new InvalidAbfsRestOperationException(ex);
-    }
+      final String commaSeparatedProperties;
+      try {
 
 Review comment:
   maybe the tracker lifecycle should only be round the client. call, not everything else?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message