captainzmc commented on a change in pull request #2640:
URL: https://github.com/apache/ozone/pull/2640#discussion_r709796084



##########
File path: 
hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/common/Checksum.java
##########
@@ -154,11 +158,6 @@ public ChecksumData computeChecksum(List<ByteString> 
byteStrings)
 
   public ChecksumData computeChecksum(ChunkBuffer data)
       throws OzoneChecksumException {
-    if (checksumType == ChecksumType.NONE) {
-      // Since type is set to NONE, we do not need to compute the checksums
-      return new ChecksumData(checksumType, bytesPerChecksum);
-    }
-

Review comment:
       Yes, I hadn't noticed that this method was used by other codes.  
   I will submit a new PR. We only need to add judgments to 
computeChecksum(ByteBuffer Data) to avoid redundant ByteBuffer conversions in 
this method




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