You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by we...@apache.org on 2020/12/03 23:16:10 UTC
[hadoop] branch branch-3.1 updated: HDFS-15706. HttpFS: Log more
information on request failures. (#2515)
This is an automated email from the ASF dual-hosted git repository.
weichiu pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/branch-3.1 by this push:
new 5f5d7ec HDFS-15706. HttpFS: Log more information on request failures. (#2515)
5f5d7ec is described below
commit 5f5d7ecf5995a84dd741636fb54bf8e4b7483b42
Author: Ahmed Hussein <50...@users.noreply.github.com>
AuthorDate: Thu Dec 3 17:14:40 2020 -0600
HDFS-15706. HttpFS: Log more information on request failures. (#2515)
(cherry picked from commit 07655a7040806c4c9687288de89e42cfacf0365e)
(cherry picked from commit a7dbd3b6f978d28ef7e046add2e3270ae3d9d9f6)
(cherry picked from commit f547cd43d140dc680fab1782cda071f4a41dddc5)
---
.../org/apache/hadoop/fs/http/server/HttpFSExceptionProvider.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/HttpFSExceptionProvider.java b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/HttpFSExceptionProvider.java
index aed6343..e0b98c6 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/HttpFSExceptionProvider.java
+++ b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/HttpFSExceptionProvider.java
@@ -70,12 +70,16 @@ public class HttpFSExceptionProvider extends ExceptionProvider {
status = Response.Status.NOT_FOUND;
} else if (throwable instanceof IOException) {
status = Response.Status.INTERNAL_SERVER_ERROR;
+ logErrorFully(status, throwable);
} else if (throwable instanceof UnsupportedOperationException) {
status = Response.Status.BAD_REQUEST;
+ logErrorFully(status, throwable);
} else if (throwable instanceof IllegalArgumentException) {
status = Response.Status.BAD_REQUEST;
+ logErrorFully(status, throwable);
} else {
status = Response.Status.INTERNAL_SERVER_ERROR;
+ logErrorFully(status, throwable);
}
return createResponse(status, throwable);
}
@@ -95,4 +99,7 @@ public class HttpFSExceptionProvider extends ExceptionProvider {
LOG.warn("[{}:{}] response [{}] {}", new Object[]{method, path, status, message}, throwable);
}
+ private void logErrorFully(Response.Status status, Throwable throwable) {
+ LOG.debug("Failed with {}", status, throwable);
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org