errose28 commented on code in PR #4972:
URL: https://github.com/apache/ozone/pull/4972#discussion_r1262007986
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ozoneimpl/ContainerReader.java:
##########
@@ -232,4 +239,21 @@ public void verifyAndFixupContainerData(ContainerData
containerData)
ContainerProtos.Result.UNKNOWN_CONTAINER_TYPE);
}
}
+
+ private void cleanupContainer(
+ HddsVolume volume, KeyValueContainer kvContainer) {
+ try {
+ LOG.info("Cleanup container {}.",
+ kvContainer.getContainerData().getContainerID());
Review Comment:
nit.
```suggestion
LOG.info("Finishing delete of container {}.",
kvContainer.getContainerData().getContainerID());
```
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ozoneimpl/ContainerReader.java:
##########
@@ -232,4 +239,21 @@ public void verifyAndFixupContainerData(ContainerData
containerData)
ContainerProtos.Result.UNKNOWN_CONTAINER_TYPE);
}
}
+
+ private void cleanupContainer(
+ HddsVolume volume, KeyValueContainer kvContainer) {
+ try {
+ LOG.info("Cleanup container {}.",
+ kvContainer.getContainerData().getContainerID());
+ // container information from db is removed for V3
+ // and container moved to tmp folder
+ // then container content removed from tmp folder
+ KeyValueContainerUtil.removeContainer(kvContainer.getContainerData(),
+ volume.getConf());
+ kvContainer.delete();
+ } catch (IOException ex) {
+ LOG.warn("Failed to remove container {}.",
+ kvContainer.getContainerData().getContainerID(), ex);
Review Comment:
nit.
```suggestion
LOG.warn("Failed to remove deleted container {}.",
kvContainer.getContainerData().getContainerID(), ex);
```
--
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]