smengcl commented on code in PR #8587:
URL: https://github.com/apache/ozone/pull/8587#discussion_r2417776380


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyRequest.java:
##########
@@ -903,6 +904,22 @@ protected static long sumBlockLengths(OmKeyInfo omKeyInfo) 
{
     return bytesUsed;
   }
 
+  /**
+   * @return the number of bytes used by blocks pointed to by {@code 
omKeyInfo}.
+   */
+  public static long sumBlockLengths(OzoneManagerProtocolProtos.KeyInfo 
keyInfo) {
+    long bytesUsed = 0;
+    ReplicationConfig replicationConfig = 
ReplicationConfig.fromProto(keyInfo.getType(), keyInfo.getFactor(),
+            keyInfo.getEcReplicationConfig());
+    for (OzoneManagerProtocolProtos.KeyLocationList group: 
keyInfo.getKeyLocationListList()) {

Review Comment:
   hmm looks like this is not changed. can you double check?
   
   also it looks like this `sumBlockLengths` method is not used anymore. can 
you remove it in this case?



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