Browse Source

YARN-3538. TimelineWebService doesn't catch runtime exception. Contributed by Steve Loughran and Tsuyoshi Ozawa.

Junping Du 8 years ago
parent
commit
f05a9ceb4a

+ 4 - 0
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,