List of usage examples for org.apache.hadoop.yarn.api.records.timeline TimelineEntities getEntities
@XmlElement(name = "entities") public List<TimelineEntity> getEntities()
From source file:org.Microsoft.Telemetry.IntermediateHistoryStore.java
License:Open Source License
/** * This method is Main of My Project , this IntermediateHistoryStore class * extends TimelineStore of yarn and Override all function To pass the * information of each job to Timeline Storage original And This project * takes the Intermediate information and pulls out What is important and * sends the information as Telemetry to Application Insights Any errors * occurring for individual put request objects will be reported in the * response./*from ww w .j av a2s . c om*/ * * @param data a {@link TimelineEntities} object. * @return a {@link TimelinePutResponse} object. * @throws IOException */ @Override public TimelinePutResponse put(TimelineEntities data) throws IOException { TimelinePutResponse response = null; try { if (originalStorage != null) { response = originalStorage.put(data); } if (data != null) { if (data.getEntities().size() > 0) { for (TimelineEntity entity : data.getEntities()) { if (entity != null) { serviceInformation.SendInfoToApplicationInsights(entity); //putToLog(entity); } } } } } catch (IOException e) { String message = PATTERN_LOG_ERROR + "Creating a problem while send TimelineEntity "; LOG.error(message, e); } catch (Exception ex) { String message = PATTERN_LOG_ERROR + "Creating a problem while send TimelineEntity "; LOG.error(message, ex); } return response; }