test_class.file: smart-metastore/src/test/java/org/smartdata/metastore/dao/TestAccessEventAggregator.java
test_class.identifier: TestAccessEventAggregator
test_case.body: @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));
    }
test_case.class_method_signature: TestAccessEventAggregator.testAccessEventAggregator()
test_case.full_signature: @Test public void testAccessEventAggregator()
test_case.identifier: testAccessEventAggregator
test_case.invocations: mock mock addAccessEvents newArrayList execute verify never anyString addAccessEvents newArrayList execute verify times anyString addTable verify times any addAccessEvents newArrayList execute verify times anyString addTable verify times any
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testAccessEventAggregator()
focal_class.declarator: adapter
focal_class.modifier: private final
focal_class.original_string: private final MetaStore adapter;
focal_class.type: MetaStore
focal_class.var_name: adapter
focal_class.declarator: aggregationGranularity
focal_class.modifier: private final
focal_class.original_string: private final long aggregationGranularity;
focal_class.type: long
focal_class.var_name: aggregationGranularity
focal_class.declarator: accessCountTableManager
focal_class.modifier: private final
focal_class.original_string: private final AccessCountTableManager accessCountTableManager;
focal_class.type: AccessCountTableManager
focal_class.var_name: accessCountTableManager
focal_class.declarator: currentWindow
focal_class.modifier: private
focal_class.original_string: private Window currentWindow;
focal_class.type: Window
focal_class.var_name: currentWindow
focal_class.declarator: eventBuffer
focal_class.modifier: private
focal_class.original_string: private List<FileAccessEvent> eventBuffer;
focal_class.type: List<FileAccessEvent>
focal_class.var_name: eventBuffer
focal_class.declarator: lastAccessCount = new HashMap<>()
focal_class.modifier: private
focal_class.original_string: private Map<String, Integer> lastAccessCount = new HashMap<>();
focal_class.type: Map<String, Integer>
focal_class.var_name: lastAccessCount
focal_class.declarator: LOG =
        LoggerFactory.getLogger(AccessEventAggregator.class)
focal_class.modifier: public static final
focal_class.original_string: public static final Logger LOG =
        LoggerFactory.getLogger(AccessEventAggregator.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.file: smart-metastore/src/main/java/org/smartdata/metastore/dao/AccessEventAggregator.java
focal_class.identifier: AccessEventAggregator
focal_class.class_method_signature: AccessEventAggregator.AccessEventAggregator(MetaStore adapter, AccessCountTableManager manager)
focal_class.full_signature: public  AccessEventAggregator(MetaStore adapter, AccessCountTableManager manager)
focal_class.identifier: AccessEventAggregator
focal_class.modifiers: public
focal_class.parameters: (MetaStore adapter, AccessCountTableManager manager)
focal_class.signature:  AccessEventAggregator(MetaStore adapter, AccessCountTableManager manager)
focal_class.class_method_signature: AccessEventAggregator.AccessEventAggregator(MetaStore adapter,
        AccessCountTableManager manager, long aggregationGranularity)
focal_class.full_signature: public  AccessEventAggregator(MetaStore adapter,
        AccessCountTableManager manager, long aggregationGranularity)
focal_class.identifier: AccessEventAggregator
focal_class.modifiers: public
focal_class.parameters: (MetaStore adapter,
        AccessCountTableManager manager, long aggregationGranularity)
focal_class.signature:  AccessEventAggregator(MetaStore adapter,
        AccessCountTableManager manager, long aggregationGranularity)
focal_class.class_method_signature: AccessEventAggregator.addAccessEvents(List<FileAccessEvent> eventList)
focal_class.full_signature: public void addAccessEvents(List<FileAccessEvent> eventList)
focal_class.identifier: addAccessEvents
focal_class.modifiers: public
focal_class.parameters: (List<FileAccessEvent> eventList)
focal_class.return: void
focal_class.signature: void addAccessEvents(List<FileAccessEvent> eventList)
focal_class.class_method_signature: AccessEventAggregator.createTable()
focal_class.full_signature: private void createTable()
focal_class.identifier: createTable
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void createTable()
focal_class.class_method_signature: AccessEventAggregator.mergeMap(Map<String, Integer> map1, Map<String, Integer> map2)
focal_class.full_signature: private Map<String, Integer> mergeMap(Map<String, Integer> map1, Map<String, Integer> map2)
focal_class.identifier: mergeMap
focal_class.modifiers: private
focal_class.parameters: (Map<String, Integer> map1, Map<String, Integer> map2)
focal_class.return: Map<String, Integer>
focal_class.signature: Map<String, Integer> mergeMap(Map<String, Integer> map1, Map<String, Integer> map2)
focal_class.class_method_signature: AccessEventAggregator.getAccessCountMap(List<FileAccessEvent> events)
focal_class.full_signature: private Map<String, Integer> getAccessCountMap(List<FileAccessEvent> events)
focal_class.identifier: getAccessCountMap
focal_class.modifiers: private
focal_class.parameters: (List<FileAccessEvent> events)
focal_class.return: Map<String, Integer>
focal_class.signature: Map<String, Integer> getAccessCountMap(List<FileAccessEvent> events)
focal_class.class_method_signature: AccessEventAggregator.assignWindow(long time)
focal_class.full_signature: private Window assignWindow(long time)
focal_class.identifier: assignWindow
focal_class.modifiers: private
focal_class.parameters: (long time)
focal_class.return: Window
focal_class.signature: Window assignWindow(long time)
focal_method.body: public AccessEventAggregator(MetaStore adapter, AccessCountTableManager manager) {
      this(adapter, manager,  5 * 1000L);
    }
focal_method.class_method_signature: AccessEventAggregator.AccessEventAggregator(MetaStore adapter, AccessCountTableManager manager)
focal_method.full_signature: public  AccessEventAggregator(MetaStore adapter, AccessCountTableManager manager)
focal_method.identifier: AccessEventAggregator
focal_method.modifiers: public
focal_method.parameters: (MetaStore adapter, AccessCountTableManager manager)
focal_method.signature:  AccessEventAggregator(MetaStore adapter, AccessCountTableManager manager)