Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
KeyValueContainer # importContainerData
if (getContainerFile().exists()) { String errorMessage = String.format( "Can't import container (cid=%d) data to a specific location" + " as the container descriptor (%s) has already been exist.", getContainerData().getContainerID(), getContainerFile().getAbsolutePath()); throw new IOException(errorMessage); } .... catch (Exception ex) { //delete all the temporary data in case of any exception. try { FileUtils.deleteDirectory(new File(containerData.getMetadataPath())); FileUtils.deleteDirectory(new File(containerData.getChunksPath())); FileUtils.deleteDirectory(getContainerFile()); } catch (Exception deleteex) { LOG.error( "Can not cleanup destination directories after a container import" + " error (cid" + containerData.getContainerID() + ")", deleteex); } throw ex;
That's one of the reason why DN report empty container directories during startup.
2021-03-16 16:26:58,337 [Thread-9] ERROR org.apache.hadoop.ozone.container.ozoneimpl.ContainerReader: Missing .container file for ContainerID: 112224
2021-03-16 16:26:58,433 [Thread-9] ERROR org.apache.hadoop.ozone.container.ozoneimpl.ContainerReader: Missing .container file for ContainerID: 11913
2021-03-16 16:26:58,474 [Thread-9] ERROR org.apache.hadoop.ozone.container.ozoneimpl.ContainerReader: Missing .container file for ContainerID: 11823
Attachments
Issue Links
- is related to
-
HDDS-3943 Cleanup empty container directory
- Open
- links to