diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index d5208da7648..43505d7323b 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -1064,6 +1064,9 @@ Release 2.7.0 - UNRELEASED HDFS-6753. Initialize checkDisk when DirectoryScanner not able to get files list for scanning (J.Andreina via vinayakumarb) + HDFS-7785. Improve diagnostics information for HttpPutFailedException. + (Chengbing Liu via wheat9) + BREAKDOWN OF HDFS-7584 SUBTASKS AND RELATED JIRAS HDFS-7720. Quota by Storage Type API, tools and ClientNameNode diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/TransferFsImage.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/TransferFsImage.java index c1e9d7f5148..0d327580c26 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/TransferFsImage.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/TransferFsImage.java @@ -291,7 +291,9 @@ public class TransferFsImage { int responseCode = connection.getResponseCode(); if (responseCode != HttpURLConnection.HTTP_OK) { - throw new HttpPutFailedException(connection.getResponseMessage(), + throw new HttpPutFailedException(String.format( + "Image uploading failed, status: %d, url: %s, message: %s", + responseCode, urlWithParams, connection.getResponseMessage()), responseCode); } } catch (AuthenticationException e) {