EntityGroupFSTimelineStore extends CompositeService implements TimelineStore { @InterfaceAudience.Private @VisibleForTesting int scanActiveLogs() throws IOException { long startTime = Time.monotonicNow(); int logsToScanCount = scanActiveLogs(activeRootPath); metrics.addActiveLogDirScanTime(Time.monotonicNow() - startTime); return logsToScanCount; } EntityGroupFSTimelineStore(); @Override TimelineEntities getEntities(String entityType, Long limit,
      Long windowStart, Long windowEnd, String fromId, Long fromTs,
      NameValuePair primaryFilter, Collection<NameValuePair> secondaryFilters,
      EnumSet<Field> fieldsToRetrieve, CheckAcl checkAcl); @Override TimelineEntity getEntity(String entityId, String entityType,
      EnumSet<Field> fieldsToRetrieve); @Override TimelineEvents getEntityTimelines(String entityType,
      SortedSet<String> entityIds, Long limit, Long windowStart,
      Long windowEnd, Set<String> eventTypes); @Override TimelineDomain getDomain(String domainId); @Override TimelineDomains getDomains(String owner); @Override TimelinePutResponse put(TimelineEntities data); @Override void put(TimelineDomain domain);  }
@Test public void testScanActiveLogsWithInvalidFile() throws Exception { Path invalidFile = new Path(testActiveDirPath, "invalidfile"); try { if (!fs.exists(invalidFile)) { fs.createNewFile(invalidFile); } store.scanActiveLogs(); } catch (StackOverflowError error) { Assert.fail("EntityLogScanner crashed with StackOverflowError"); } finally { if (fs.exists(invalidFile)) { fs.delete(invalidFile, false); } } }