szetszwo commented on code in PR #6610:
URL: https://github.com/apache/ozone/pull/6610#discussion_r1594708671


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/impl/KeyValueStreamDataChannel.java:
##########
@@ -167,11 +163,9 @@ public int write(ReferenceCountedObject<ByteBuffer> 
referenceCounted)
     getMetrics().incContainerOpsMetrics(getType());
     assertOpen();
 
-    final long l = Time.monotonicNow();
-    int len = writeBuffers(referenceCounted, buffers, super::writeFileChannel);
-    getMetrics()
-        .incContainerOpsLatencies(getType(), Time.monotonicNow() - l);
-    return len;
+    final long start = Time.monotonicNow();

Review Comment:
   `writeBuffers` runs in a loop but using the same `start` time.  The time 
will be double count when there are more than one buffers.



##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/impl/KeyValueStreamDataChannel.java:
##########
@@ -140,10 +140,6 @@ void cleanUpAll() {
     }
   }
 
-  interface WriteMethod {
-    int applyAsInt(ByteBuffer src) throws IOException;
-  }

Review Comment:
   This is only used in `KeyValueStreamDataChannel`.  Let's keep it here.
   



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to