HDDS-1417. After successfully importing a container, datanode should delete the container tar.gz file from working directory. (#721)
This commit is contained in:
parent
87407553ef
commit
e9c4109004
@ -95,13 +95,12 @@ public void importContainer(long containerID, Path tarFilePath) {
|
|||||||
LOG.error(
|
LOG.error(
|
||||||
"Can't import the downloaded container data id=" + containerID,
|
"Can't import the downloaded container data id=" + containerID,
|
||||||
e);
|
e);
|
||||||
|
} finally {
|
||||||
try {
|
try {
|
||||||
Files.delete(tarFilePath);
|
Files.delete(tarFilePath);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
LOG.error(
|
LOG.error("Got exception while deleting downloaded container file: "
|
||||||
"Container import is failed and the downloaded file can't be "
|
+ tarFilePath.toAbsolutePath().toString(), ex);
|
||||||
+ "deleted: "
|
|
||||||
+ tarFilePath.toAbsolutePath().toString());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user