YARN-3538. TimelineWebService doesn't catch runtime exception. Contributed by Steve Loughran and Tsuyoshi Ozawa.
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/f05a9ceb Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/f05a9ceb Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/f05a9ceb Branch: refs/heads/HADOOP-13070 Commit: f05a9ceb4a9623517aa1c8d995805e26ae1bde5a Parents: b4f1971 Author: Junping Du <[email protected]> Authored: Thu Nov 17 16:55:39 2016 -0800 Committer: Junping Du <[email protected]> Committed: Thu Nov 17 16:55:39 2016 -0800 ---------------------------------------------------------------------- .../hadoop/yarn/server/timeline/webapp/TimelineWebServices.java | 4 ++++ 1 file changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/f05a9ceb/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/timeline/webapp/TimelineWebServices.java ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/timeline/webapp/TimelineWebServices.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/timeline/webapp/TimelineWebServices.java index d4acbe4..ad4e2bb 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/timeline/webapp/TimelineWebServices.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/timeline/webapp/TimelineWebServices.java @@ -270,6 +270,10 @@ public class TimelineWebServices { // The user doesn't have the access to override the existing domain. LOG.error(e.getMessage(), e); throw new ForbiddenException(e); + } catch (RuntimeException e) { + LOG.error("Error putting domain", e); + throw new WebApplicationException(e, + Response.Status.INTERNAL_SERVER_ERROR); } catch (IOException e) { LOG.error("Error putting domain", e); throw new WebApplicationException(e, --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
