HDFS-7583. Fix findbug in TransferFsImage.java (Contributed by Vinayakumar B)

(cherry picked from commit 4cd66f7fb2)
This commit is contained in:
Vinayakumar B 2015-01-06 09:31:35 +05:30
parent 383e1c5f73
commit 53ecb63587
2 changed files with 5 additions and 2 deletions

View File

@ -385,6 +385,8 @@ Release 2.7.0 - UNRELEASED
HDFS-7572. TestLazyPersistFiles#testDnRestartWithSavedReplicas is flaky on HDFS-7572. TestLazyPersistFiles#testDnRestartWithSavedReplicas is flaky on
Windows. (Arpit Agarwal via cnauroth) Windows. (Arpit Agarwal via cnauroth)
HDFS-7583. Fix findbug in TransferFsImage.java (vinayakumarb)
Release 2.6.1 - UNRELEASED Release 2.6.1 - UNRELEASED
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -574,11 +574,12 @@ public class TransferFsImage {
LOG.info("Deleting temporary files: " + files); LOG.info("Deleting temporary files: " + files);
for (File file : files) { for (File file : files) {
file.delete(); // ignore the return value if (!file.delete()) {
LOG.warn("Deleting " + file + " has failed");
}
} }
} }
private static MD5Hash parseMD5Header(HttpURLConnection connection) { private static MD5Hash parseMD5Header(HttpURLConnection connection) {
String header = connection.getHeaderField(MD5_HEADER); String header = connection.getHeaderField(MD5_HEADER);
return (header != null) ? new MD5Hash(header) : null; return (header != null) ? new MD5Hash(header) : null;