HADOOP-12795. KMS does not log detailed stack trace for unexpected errors. Contributed by Chris Nauroth.
(cherry picked from commit70c756d35e
) (cherry picked from commit25dcb88630
)
This commit is contained in:
parent
379c2f4c05
commit
ddd82d24be
|
@ -994,6 +994,9 @@ Release 2.8.0 - UNRELEASED
|
||||||
"hadoop.workaround.non.threadsafe.getpwuid" is different between
|
"hadoop.workaround.non.threadsafe.getpwuid" is different between
|
||||||
core-default.xml and NativeIO.java (Akira AJISAKA via cmccabe)
|
core-default.xml and NativeIO.java (Akira AJISAKA via cmccabe)
|
||||||
|
|
||||||
|
HADOOP-12795. KMS does not log detailed stack trace for unexpected errors.
|
||||||
|
(cnauroth)
|
||||||
|
|
||||||
Release 2.7.3 - UNRELEASED
|
Release 2.7.3 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -86,12 +86,14 @@ public class KMSExceptionsProvider implements ExceptionMapper<Exception> {
|
||||||
status = Response.Status.FORBIDDEN;
|
status = Response.Status.FORBIDDEN;
|
||||||
} else if (exception instanceof IOException) {
|
} else if (exception instanceof IOException) {
|
||||||
status = Response.Status.INTERNAL_SERVER_ERROR;
|
status = Response.Status.INTERNAL_SERVER_ERROR;
|
||||||
|
log(status, throwable);
|
||||||
} else if (exception instanceof UnsupportedOperationException) {
|
} else if (exception instanceof UnsupportedOperationException) {
|
||||||
status = Response.Status.BAD_REQUEST;
|
status = Response.Status.BAD_REQUEST;
|
||||||
} else if (exception instanceof IllegalArgumentException) {
|
} else if (exception instanceof IllegalArgumentException) {
|
||||||
status = Response.Status.BAD_REQUEST;
|
status = Response.Status.BAD_REQUEST;
|
||||||
} else {
|
} else {
|
||||||
status = Response.Status.INTERNAL_SERVER_ERROR;
|
status = Response.Status.INTERNAL_SERVER_ERROR;
|
||||||
|
log(status, throwable);
|
||||||
}
|
}
|
||||||
if (doAudit) {
|
if (doAudit) {
|
||||||
KMSWebApp.getKMSAudit().error(KMSMDCFilter.getUgi(),
|
KMSWebApp.getKMSAudit().error(KMSMDCFilter.getUgi(),
|
||||||
|
|
Loading…
Reference in New Issue