@Test public void testAccessEventAggregator() throws MetaStoreException { MetaStore adapter = mock(MetaStore.class); AccessCountTableManager manager = mock(AccessCountTableManager.class); AccessEventAggregator aggregator = new AccessEventAggregator(adapter, manager); aggregator.addAccessEvents(Lists.newArrayList(new FileAccessEvent("", 3000))); verify(adapter, never()).execute(anyString()); aggregator.addAccessEvents(Lists.newArrayList(new FileAccessEvent("", 6000))); verify(adapter, times(1)).execute(anyString()); verify(manager, times(1)).addTable(any(AccessCountTable.class)); aggregator.addAccessEvents( Lists.newArrayList( new FileAccessEvent("abc", 8000), new FileAccessEvent("def", 14000), new FileAccessEvent("", 18000))); verify(adapter, times(3)).execute(anyString()); verify(manager, times(3)).addTable(any(AccessCountTable.class)); }
public AccessEventAggregator(MetaStore adapter, AccessCountTableManager manager) { this(adapter, manager, 5 * 1000L); }
AccessEventAggregator { public AccessEventAggregator(MetaStore adapter, AccessCountTableManager manager) { this(adapter, manager, 5 * 1000L); } }
AccessEventAggregator { public AccessEventAggregator(MetaStore adapter, AccessCountTableManager manager) { this(adapter, manager, 5 * 1000L); } AccessEventAggregator(MetaStore adapter, AccessCountTableManager manager);  AccessEventAggregator(MetaStore adapter,
      AccessCountTableManager manager, long aggregationGranularity); }
AccessEventAggregator { public AccessEventAggregator(MetaStore adapter, AccessCountTableManager manager) { this(adapter, manager, 5 * 1000L); } AccessEventAggregator(MetaStore adapter, AccessCountTableManager manager);  AccessEventAggregator(MetaStore adapter,
      AccessCountTableManager manager, long aggregationGranularity); void addAccessEvents(List<FileAccessEvent> eventList); }
AccessEventAggregator { public AccessEventAggregator(MetaStore adapter, AccessCountTableManager manager) { this(adapter, manager, 5 * 1000L); } AccessEventAggregator(MetaStore adapter, AccessCountTableManager manager);  AccessEventAggregator(MetaStore adapter,
      AccessCountTableManager manager, long aggregationGranularity); void addAccessEvents(List<FileAccessEvent> eventList); static final Logger LOG; }