You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2019/11/01 22:35:01 UTC

[GitHub] [hadoop] jeeteshm commented on a change in pull request #1611: HADOOP-16612 Track Azure Blob File System client-perceived latency

jeeteshm 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_r341773035
 
 

 ##########
 File path: hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsOutputStream.java
 ##########
 @@ -289,10 +289,13 @@ private synchronized void writeCurrentBufferToService() throws IOException {
     final Future<Void> job = completionService.submit(new Callable<Void>() {
       @Override
       public Void call() throws Exception {
-        client.append(path, offset, bytes, 0,
-            bytesLength);
-        byteBufferPool.putBuffer(ByteBuffer.wrap(bytes));
-        return null;
+        try (AbfsPerfInfo tracker = new AbfsPerfInfo(client.getAbfsPerfTracker(), "writeCurrentBufferToService", "append")) {
 
 Review comment:
   I have split the line.
   The constant strings here are actually the names of the containing method and the about-to-be-called method. Moreover, we need these strings at only one place: this line where "writeCurrentBufferToService" is calling "append". Don't you think that pulling all such method names out into a long list of constants will bloat up the code?

----------------------------------------------------------------
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