test_class.file: smart-metastore/src/test/java/org/smartdata/metastore/dao/TestAccessCountTableManager.java
test_class.identifier: TestAccessCountTableManager
test_class.superclass: extends DBTest
test_case.body: @Test
    public void testAccessFileNotInNamespace() throws Exception {
      AccessCountTableManager manager = initTestEnvironment();
      List<FileAccessEvent> accessEvents = new ArrayList<>();
      accessEvents.add(new FileAccessEvent("file1", 0));
      accessEvents.add(new FileAccessEvent("file2", 1));
      accessEvents.add(new FileAccessEvent("file2", 2));
      accessEvents.add(new FileAccessEvent("file3", 2));
      accessEvents.add(new FileAccessEvent("file3", 3));
      accessEvents.add(new FileAccessEvent("file3", 4));
      accessEvents.add(new FileAccessEvent("file4", 5));
  
      accessEvents.add(new FileAccessEvent("file3", 5000));
      accessEvents.add(new FileAccessEvent("file3", 10000));
  
      manager.onAccessEventsArrived(accessEvents);
      assertTableEquals(new AccessCountTable(0L, 5000L).getTableName(), "expect1");
      assertTableEquals(new AccessCountTable(5000L, 10000L).getTableName(), "expect2");
  
      accessEvents.clear();
      accessEvents.add(new FileAccessEvent("file4", 10001));
      accessEvents.add(new FileAccessEvent("file4", 10002));
      accessEvents.add(new FileAccessEvent("file3", 15000));
      accessEvents.add(new FileAccessEvent("file4", 15001));
      accessEvents.add(new FileAccessEvent("file3", 20000));
      manager.onAccessEventsArrived(accessEvents);
      assertTableEquals(new AccessCountTable(10000L, 15000L).getTableName(), "expect2");
      assertTableEquals(new AccessCountTable(15000L, 20000L).getTableName(), "expect2");
  
      insertNewFile(new MetaStore(druidPool), "file4", 4L);
      accessEvents.clear();
      accessEvents.add(new FileAccessEvent("file4", 25000));
      manager.onAccessEventsArrived(accessEvents);
      assertTableEquals(new AccessCountTable(20000L, 25000L).getTableName(), "expect3");
    }
test_case.class_method_signature: TestAccessCountTableManager.testAccessFileNotInNamespace()
test_case.full_signature: @Test public void testAccessFileNotInNamespace()
test_case.identifier: testAccessFileNotInNamespace
test_case.invocations: initTestEnvironment add add add add add add add add add onAccessEventsArrived assertTableEquals getTableName assertTableEquals getTableName clear add add add add add onAccessEventsArrived assertTableEquals getTableName assertTableEquals getTableName insertNewFile clear add onAccessEventsArrived assertTableEquals getTableName
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testAccessFileNotInNamespace()
focal_class.declarator: NUM_DAY_TABLES_TO_KEEP = 30
focal_class.modifier: private static final
focal_class.original_string: private static final int NUM_DAY_TABLES_TO_KEEP = 30;
focal_class.type: int
focal_class.var_name: NUM_DAY_TABLES_TO_KEEP
focal_class.declarator: NUM_HOUR_TABLES_TO_KEEP = 48
focal_class.modifier: private static final
focal_class.original_string: private static final int NUM_HOUR_TABLES_TO_KEEP = 48;
focal_class.type: int
focal_class.var_name: NUM_HOUR_TABLES_TO_KEEP
focal_class.declarator: NUM_MINUTE_TABLES_TO_KEEP = 120
focal_class.modifier: private static final
focal_class.original_string: private static final int NUM_MINUTE_TABLES_TO_KEEP = 120;
focal_class.type: int
focal_class.var_name: NUM_MINUTE_TABLES_TO_KEEP
focal_class.declarator: NUM_SECOND_TABLES_TO_KEEP = 30
focal_class.modifier: private static final
focal_class.original_string: private static final int NUM_SECOND_TABLES_TO_KEEP = 30;
focal_class.type: int
focal_class.var_name: NUM_SECOND_TABLES_TO_KEEP
focal_class.declarator: metaStore
focal_class.modifier: private
focal_class.original_string: private MetaStore metaStore;
focal_class.type: MetaStore
focal_class.var_name: metaStore
focal_class.declarator: tableDeques
focal_class.modifier: private
focal_class.original_string: private Map<TimeGranularity, AccessCountTableDeque> tableDeques;
focal_class.type: Map<TimeGranularity, AccessCountTableDeque>
focal_class.var_name: tableDeques
focal_class.declarator: secondTableDeque
focal_class.modifier: private
focal_class.original_string: private AccessCountTableDeque secondTableDeque;
focal_class.type: AccessCountTableDeque
focal_class.var_name: secondTableDeque
focal_class.declarator: accessEventAggregator
focal_class.modifier: private
focal_class.original_string: private AccessEventAggregator accessEventAggregator;
focal_class.type: AccessEventAggregator
focal_class.var_name: accessEventAggregator
focal_class.declarator: executorService
focal_class.modifier: private
focal_class.original_string: private ExecutorService executorService;
focal_class.type: ExecutorService
focal_class.var_name: executorService
focal_class.declarator: LOG =
        LoggerFactory.getLogger(AccessCountTableManager.class)
focal_class.modifier: public static final
focal_class.original_string: public static final Logger LOG =
        LoggerFactory.getLogger(AccessCountTableManager.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.file: smart-metastore/src/main/java/org/smartdata/metastore/dao/AccessCountTableManager.java
focal_class.identifier: AccessCountTableManager
focal_class.class_method_signature: AccessCountTableManager.AccessCountTableManager(MetaStore adapter)
focal_class.full_signature: public  AccessCountTableManager(MetaStore adapter)
focal_class.identifier: AccessCountTableManager
focal_class.modifiers: public
focal_class.parameters: (MetaStore adapter)
focal_class.signature:  AccessCountTableManager(MetaStore adapter)
focal_class.class_method_signature: AccessCountTableManager.AccessCountTableManager(MetaStore adapter, ExecutorService service)
focal_class.full_signature: public  AccessCountTableManager(MetaStore adapter, ExecutorService service)
focal_class.identifier: AccessCountTableManager
focal_class.modifiers: public
focal_class.parameters: (MetaStore adapter, ExecutorService service)
focal_class.signature:  AccessCountTableManager(MetaStore adapter, ExecutorService service)
focal_class.class_method_signature: AccessCountTableManager.initTables()
focal_class.full_signature: private void initTables()
focal_class.identifier: initTables
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void initTables()
focal_class.class_method_signature: AccessCountTableManager.recoverTables()
focal_class.full_signature: private void recoverTables()
focal_class.identifier: recoverTables
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void recoverTables()
focal_class.class_method_signature: AccessCountTableManager.addTable(AccessCountTable accessCountTable)
focal_class.full_signature: public void addTable(AccessCountTable accessCountTable)
focal_class.identifier: addTable
focal_class.modifiers: public
focal_class.parameters: (AccessCountTable accessCountTable)
focal_class.return: void
focal_class.signature: void addTable(AccessCountTable accessCountTable)
focal_class.class_method_signature: AccessCountTableManager.onAccessEventsArrived(List<FileAccessEvent> accessEvents)
focal_class.full_signature: public void onAccessEventsArrived(List<FileAccessEvent> accessEvents)
focal_class.identifier: onAccessEventsArrived
focal_class.modifiers: public
focal_class.parameters: (List<FileAccessEvent> accessEvents)
focal_class.return: void
focal_class.signature: void onAccessEventsArrived(List<FileAccessEvent> accessEvents)
focal_class.class_method_signature: AccessCountTableManager.getTables(long lengthInMillis)
focal_class.full_signature: public List<AccessCountTable> getTables(long lengthInMillis)
focal_class.identifier: getTables
focal_class.modifiers: public
focal_class.parameters: (long lengthInMillis)
focal_class.return: List<AccessCountTable>
focal_class.signature: List<AccessCountTable> getTables(long lengthInMillis)
focal_class.class_method_signature: AccessCountTableManager.getTables(
        Map<TimeGranularity, AccessCountTableDeque> tableDeques,
        MetaStore metaStore,
        long lengthInMillis)
focal_class.full_signature: public static List<AccessCountTable> getTables(
        Map<TimeGranularity, AccessCountTableDeque> tableDeques,
        MetaStore metaStore,
        long lengthInMillis)
focal_class.identifier: getTables
focal_class.modifiers: public static
focal_class.parameters: (
        Map<TimeGranularity, AccessCountTableDeque> tableDeques,
        MetaStore metaStore,
        long lengthInMillis)
focal_class.return: List<AccessCountTable>
focal_class.signature: List<AccessCountTable> getTables(
        Map<TimeGranularity, AccessCountTableDeque> tableDeques,
        MetaStore metaStore,
        long lengthInMillis)
focal_class.class_method_signature: AccessCountTableManager.getTablesDuring(
        final Map<TimeGranularity, AccessCountTableDeque> tableDeques,
        MetaStore metaStore,
        final long length,
        final long endTime,
        final TimeGranularity timeGranularity)
focal_class.full_signature: private static List<AccessCountTable> getTablesDuring(
        final Map<TimeGranularity, AccessCountTableDeque> tableDeques,
        MetaStore metaStore,
        final long length,
        final long endTime,
        final TimeGranularity timeGranularity)
focal_class.identifier: getTablesDuring
focal_class.modifiers: private static
focal_class.parameters: (
        final Map<TimeGranularity, AccessCountTableDeque> tableDeques,
        MetaStore metaStore,
        final long length,
        final long endTime,
        final TimeGranularity timeGranularity)
focal_class.return: List<AccessCountTable>
focal_class.signature: List<AccessCountTable> getTablesDuring(
        final Map<TimeGranularity, AccessCountTableDeque> tableDeques,
        MetaStore metaStore,
        final long length,
        final long endTime,
        final TimeGranularity timeGranularity)
focal_class.class_method_signature: AccessCountTableManager.tableExists(
        final Map<TimeGranularity, AccessCountTableDeque> tableDeques, long start, long end)
focal_class.full_signature: private static boolean tableExists(
        final Map<TimeGranularity, AccessCountTableDeque> tableDeques, long start, long end)
focal_class.identifier: tableExists
focal_class.modifiers: private static
focal_class.parameters: (
        final Map<TimeGranularity, AccessCountTableDeque> tableDeques, long start, long end)
focal_class.return: boolean
focal_class.signature: boolean tableExists(
        final Map<TimeGranularity, AccessCountTableDeque> tableDeques, long start, long end)
focal_class.class_method_signature: AccessCountTableManager.getTableDeques()
focal_class.full_signature: @VisibleForTesting Map<TimeGranularity, AccessCountTableDeque> getTableDeques()
focal_class.identifier: getTableDeques
focal_class.modifiers: @VisibleForTesting
focal_class.parameters: ()
focal_class.return: Map<TimeGranularity, AccessCountTableDeque>
focal_class.signature: Map<TimeGranularity, AccessCountTableDeque> getTableDeques()
focal_method.body: public void onAccessEventsArrived(List<FileAccessEvent> accessEvents) {
      this.accessEventAggregator.addAccessEvents(accessEvents);
    }
focal_method.class_method_signature: AccessCountTableManager.onAccessEventsArrived(List<FileAccessEvent> accessEvents)
focal_method.full_signature: public void onAccessEventsArrived(List<FileAccessEvent> accessEvents)
focal_method.identifier: onAccessEventsArrived
focal_method.invocations: addAccessEvents
focal_method.modifiers: public
focal_method.parameters: (List<FileAccessEvent> accessEvents)
focal_method.return: void
focal_method.signature: void onAccessEventsArrived(List<FileAccessEvent> accessEvents)