@Override public TimelineEvents getEntityTimelines(String entityType, SortedSet<String> entityIds, Long limit, Long windowStart, Long windowEnd, Set<String> eventTypes) throws IOException { // TODO: This should coalesce lookups from multiple cache stores LOG.debug("getEntityTimelines type={} ids={}", entityType, entityIds); return summaryStore.getEntityTimelines(entityType, entityIds, limit, windowStart, windowEnd, eventTypes); }
@Override public TimelineEvents getEntityTimelines(String entityType, SortedSet<String> entityIds, Long limit, Long windowStart, Long windowEnd, Set<String> eventTypes) throws IOException { LOG.debug("getEntityTimelines type={} ids={}", entityType, entityIds); TimelineEvents returnEvents = new TimelineEvents(); for (String entityId : entityIds) { LOG.debug("getEntityTimeline type={} id={}", entityType, entityId); List<TimelineStore> stores = getTimelineStoresForRead(entityId, entityType); for (TimelineStore store : stores) { LOG.debug("Try timeline store {}:{} for the request", store.getName(), store.toString()); SortedSet<String> entityIdSet = new TreeSet<String>(); entityIdSet.add(entityId); TimelineEvents events = store.getEntityTimelines(entityType, entityIdSet, limit, windowStart, windowEnd, eventTypes); returnEvents.addEvents(events.getAllEvents()); } } return returnEvents; }
@Override public TimelineEvents getEntityTimelines(String entityType, SortedSet<String> entityIds, Long limit, Long windowStart, Long windowEnd, Set<String> eventTypes) throws IOException { LOG.debug("getEntityTimelines type={} ids={}", entityType, entityIds); TimelineEvents returnEvents = new TimelineEvents(); List<EntityCacheItem> relatedCacheItems = new ArrayList<>(); for (String entityId : entityIds) { LOG.debug("getEntityTimeline type={} id={}", entityType, entityId); List<TimelineStore> stores = getTimelineStoresForRead(entityId, entityType, relatedCacheItems); for (TimelineStore store : stores) { LOG.debug("Try timeline store {}:{} for the request", store.getName(), store.toString()); SortedSet<String> entityIdSet = new TreeSet<>(); entityIdSet.add(entityId); TimelineEvents events = store.getEntityTimelines(entityType, entityIdSet, limit, windowStart, windowEnd, eventTypes); if (events != null) { returnEvents.addEvents(events.getAllEvents()); } } } return returnEvents; }
UserGroupInformation callerUGI) throws YarnException, IOException { TimelineEvents events = null; events = store.getEntityTimelines( entityType, entityIds,
UserGroupInformation callerUGI) throws YarnException, IOException { TimelineEvents events = null; events = store.getEntityTimelines( entityType, entityIds,
UserGroupInformation callerUGI) throws YarnException, IOException { TimelineEvents events = null; events = store.getEntityTimelines( entityType, entityIds,
sortedSet.add(entityId1); List<EventsOfOneEntity> timelines = store.getEntityTimelines(entityType1, sortedSet, null, null, null, null).getAllEvents(); assertEquals(1, timelines.size()); timelines = store.getEntityTimelines(entityType1, sortedSet, null, null, null, null).getAllEvents(); assertEquals(2, timelines.size()); timelines = store.getEntityTimelines(entityType1, sortedSet, 1l, null, null, null).getAllEvents(); assertEquals(2, timelines.size()); timelines = store.getEntityTimelines(entityType1, sortedSet, null, 345l, null, null).getAllEvents(); assertEquals(2, timelines.size()); timelines = store.getEntityTimelines(entityType1, sortedSet, null, 123l, null, null).getAllEvents(); assertEquals(2, timelines.size()); timelines = store.getEntityTimelines(entityType1, sortedSet, null, null, 345l, null).getAllEvents(); assertEquals(2, timelines.size()); timelines = store.getEntityTimelines(entityType1, sortedSet, null, null, 123l, null).getAllEvents(); assertEquals(2, timelines.size());