Skip to content

Commit da2b4fe

Browse files
committed
YARN-9794. RM crashes due to runtime errors in TimelineServiceV2Publisher. Contributed by Tarun Parimi.
1 parent e04b8a4 commit da2b4fe

File tree

2 files changed

+6
-0
lines changed
  • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server

2 files changed

+6
-0
lines changed

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/metrics/TimelineServiceV2Publisher.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,8 @@ private void putEntity(TimelineEntity entity, ApplicationId appId) {
485485
} catch (IOException e) {
486486
LOG.error("Error when publishing entity " + entity);
487487
LOG.debug("Error when publishing entity {}", entity, e);
488+
} catch (Exception e) {
489+
LOG.error("Unexpected error when publishing entity {}", entity, e);
488490
}
489491
}
490492

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice/src/main/java/org/apache/hadoop/yarn/server/timelineservice/collector/TimelineCollectorWebService.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,10 @@ public Response putEntities(
196196
LOG.error("Error putting entities", e);
197197
throw new WebApplicationException(e,
198198
Response.Status.INTERNAL_SERVER_ERROR);
199+
} catch (Exception e) {
200+
LOG.error("Unexpected error while putting entities", e);
201+
throw new WebApplicationException(e,
202+
Response.Status.INTERNAL_SERVER_ERROR);
199203
} finally {
200204
long latency = Time.monotonicNow() - startTime;
201205
if (isAsync) {

0 commit comments

Comments
 (0)