Search in sources :

Example 1 with TimelineCollector

use of org.apache.hadoop.yarn.server.timelineservice.collector.TimelineCollector in project hadoop by apache.

the class TimelineServiceV2Publisher method putEntity.

private void putEntity(TimelineEntity entity, ApplicationId appId) {
    try {
        if (LOG.isDebugEnabled()) {
            LOG.debug("Publishing the entity " + entity + ", JSON-style content: " + TimelineUtils.dumpTimelineRecordtoJSON(entity));
        }
        TimelineCollector timelineCollector = rmTimelineCollectorManager.get(appId);
        TimelineEntities entities = new TimelineEntities();
        entities.addEntity(entity);
        timelineCollector.putEntities(entities, UserGroupInformation.getCurrentUser());
    } catch (Exception e) {
        LOG.error("Error when publishing entity " + entity, e);
    }
}
Also used : TimelineEntities(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntities) TimelineCollector(org.apache.hadoop.yarn.server.timelineservice.collector.TimelineCollector)

Aggregations

TimelineEntities (org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntities)1 TimelineCollector (org.apache.hadoop.yarn.server.timelineservice.collector.TimelineCollector)1