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: [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]