HDDS-1417. After successfully importing a container, datanode should delete the container tar.gz file from working directory. (#721)

This commit is contained in:
Nanda kumar 2019-04-11 05:25:37 +05:30 committed by Bharat Viswanadham
parent 87407553ef
commit e9c4109004
1 changed files with 3 additions and 4 deletions

View File

@ -95,13 +95,12 @@ public class DownloadAndImportReplicator implements ContainerReplicator {
LOG.error(
"Can't import the downloaded container data id=" + containerID,
e);
} finally {
try {
Files.delete(tarFilePath);
} catch (Exception ex) {
LOG.error(
"Container import is failed and the downloaded file can't be "
+ "deleted: "
+ tarFilePath.toAbsolutePath().toString());
LOG.error("Got exception while deleting downloaded container file: "
+ tarFilePath.toAbsolutePath().toString(), ex);
}
}
}