return atsEntity;
}
private static TimelineEntity convertVertexFinishedEvent(VertexFinishedEvent event) {
TimelineEntity atsEntity = new TimelineEntity();
atsEntity.setEntityId(event.getVertexID().toString());
atsEntity.setEntityType(EntityTypes.TEZ_VERTEX_ID.name());
atsEntity.addPrimaryFilter(EntityTypes.TEZ_DAG_ID.name(),
event.getVertexID().getDAGId().toString());
TimelineEvent finishEvt = new TimelineEvent();
finishEvt.setEventType(HistoryEventType.VERTEX_FINISHED.name());
finishEvt.setTimestamp(event.getFinishTime());
atsEntity.addEvent(finishEvt);
atsEntity.addOtherInfo(ATSConstants.FINISH_TIME, event.getFinishTime());
atsEntity.addOtherInfo(ATSConstants.TIME_TAKEN, (event.getFinishTime() - event.getStartTime()));
atsEntity.addOtherInfo(ATSConstants.STATUS, event.getState().name());
atsEntity.addOtherInfo(ATSConstants.DIAGNOSTICS, event.getDiagnostics());
atsEntity.addOtherInfo(ATSConstants.COUNTERS,
DAGUtils.convertCountersToATSMap(event.getTezCounters()));
atsEntity.addOtherInfo(ATSConstants.STATS,
DAGUtils.convertVertexStatsToATSMap(event.getVertexStats()));
return atsEntity;
}