|
@@ -190,9 +190,20 @@ public class NMTimelinePublisher extends CompositeService {
|
|
|
LOG.error("Seems like client has been removed before the container"
|
|
|
+ " metric could be published for " + container.getContainerId());
|
|
|
}
|
|
|
- } catch (IOException | YarnException e) {
|
|
|
+ } catch (IOException e) {
|
|
|
LOG.error("Failed to publish Container metrics for container "
|
|
|
- + container.getContainerId(), e);
|
|
|
+ + container.getContainerId());
|
|
|
+ if (LOG.isDebugEnabled()) {
|
|
|
+ LOG.debug("Failed to publish Container metrics for container "
|
|
|
+ + container.getContainerId(), e);
|
|
|
+ }
|
|
|
+ } catch (YarnException e) {
|
|
|
+ LOG.error("Failed to publish Container metrics for container "
|
|
|
+ + container.getContainerId(), e.getMessage());
|
|
|
+ if (LOG.isDebugEnabled()) {
|
|
|
+ LOG.debug("Failed to publish Container metrics for container "
|
|
|
+ + container.getContainerId(), e);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -284,9 +295,20 @@ public class NMTimelinePublisher extends CompositeService {
|
|
|
LOG.error("Seems like client has been removed before the event could be"
|
|
|
+ " published for " + container.getContainerId());
|
|
|
}
|
|
|
- } catch (IOException | YarnException e) {
|
|
|
+ } catch (IOException e) {
|
|
|
+ LOG.error("Failed to publish Container metrics for container "
|
|
|
+ + container.getContainerId());
|
|
|
+ if (LOG.isDebugEnabled()) {
|
|
|
+ LOG.debug("Failed to publish Container metrics for container "
|
|
|
+ + container.getContainerId(), e);
|
|
|
+ }
|
|
|
+ } catch (YarnException e) {
|
|
|
LOG.error("Failed to publish Container metrics for container "
|
|
|
- + container.getContainerId(), e);
|
|
|
+ + container.getContainerId(), e.getMessage());
|
|
|
+ if (LOG.isDebugEnabled()) {
|
|
|
+ LOG.debug("Failed to publish Container metrics for container "
|
|
|
+ + container.getContainerId(), e);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -315,8 +337,16 @@ public class NMTimelinePublisher extends CompositeService {
|
|
|
LOG.error("Seems like client has been removed before the entity "
|
|
|
+ "could be published for " + entity);
|
|
|
}
|
|
|
- } catch (Exception e) {
|
|
|
- LOG.error("Error when publishing entity " + entity, e);
|
|
|
+ } catch (IOException e) {
|
|
|
+ LOG.error("Error when publishing entity " + entity);
|
|
|
+ if (LOG.isDebugEnabled()) {
|
|
|
+ LOG.debug("Error when publishing entity " + entity, e);
|
|
|
+ }
|
|
|
+ } catch (YarnException e) {
|
|
|
+ LOG.error("Error when publishing entity " + entity, e.getMessage());
|
|
|
+ if (LOG.isDebugEnabled()) {
|
|
|
+ LOG.debug("Error when publishing entity " + entity, e);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|