You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/10/10 11:13:59 UTC

[GitHub] [ozone] sodonnel commented on a diff in pull request #3810: HDDS-7260. Fix the issue that the "-du" command does not return correct disk consumed with replica for both ratis and EC

sodonnel commented on code in PR #3810:
URL: https://github.com/apache/ozone/pull/3810#discussion_r991171706


##########
hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicOzoneClientAdapterImpl.java:
##########
@@ -521,8 +521,12 @@ private FileStatusAdapter toFileStatusAdapter(OzoneFileStatus status,
     OmKeyInfo keyInfo = status.getKeyInfo();
     short replication = (short) keyInfo.getReplicationConfig()
         .getRequiredNodes();
+    //calculate the number of bytes required to store the dataSize with replication
+    long diskConsumed = keyInfo.getReplicatedSize();

Review Comment:
   I don't think we need this variable - just use the `keyInfo.getReplicatedSize()` call inline.



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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