You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "ChenSammi (via GitHub)" <gi...@apache.org> on 2023/08/23 09:54:07 UTC
[GitHub] [ozone] ChenSammi commented on a diff in pull request #5047: HDDS-8995. Refactor the datanode BlockDeletingService
ChenSammi commented on code in PR #5047:
URL: https://github.com/apache/ozone/pull/5047#discussion_r1302776230
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/helpers/ContainerUtils.java:
##########
@@ -326,4 +327,15 @@ public static long retrieveContainerIdFromTarName(String tarName)
tarName);
}
}
+
+ public static long getPendingDeletionBlocks(ContainerData containerData) {
+ if (containerData.getContainerType()
+ .equals(ContainerProtos.ContainerType.KeyValueContainer)) {
+ return ((KeyValueContainerData) containerData)
+ .getNumPendingDeletionBlocks();
+ } else {
+ // If another ContainerType is available later, implement it
+ return 0L;
Review Comment:
Please throw the exception 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: 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