@Override public <EntryType, StatusType, LogType, LockType> MetadataStorageActionHandler<EntryType, StatusType, LogType, LockType> create( String entryType, MetadataStorageActionHandlerTypes<EntryType, StatusType, LogType, LockType> payloadTypes ) { return new PostgreSQLMetadataStorageActionHandler<>( connector, jsonMapper, payloadTypes, entryType, config.getEntryTable(entryType), config.getLogTable(entryType), config.getLockTable(entryType) ); } }
@Override public <A, B, C, D> MetadataStorageActionHandler<A, B, C, D> create( final String entryType, MetadataStorageActionHandlerTypes<A, B, C, D> payloadTypes ) { return new DerbyMetadataStorageActionHandler<>( connector, jsonMapper, payloadTypes, entryType, config.getEntryTable(entryType), config.getLogTable(entryType), config.getLockTable(entryType) ); } }
@Override public <EntryType, StatusType, LogType, LockType> MetadataStorageActionHandler<EntryType, StatusType, LogType, LockType> create( String entryType, MetadataStorageActionHandlerTypes<EntryType, StatusType, LogType, LockType> payloadTypes ) { return new SQLServerMetadataStorageActionHandler<>( connector, jsonMapper, payloadTypes, entryType, config.getEntryTable(entryType), config.getLogTable(entryType), config.getLockTable(entryType) ); } }
@Override public <EntryType, StatusType, LogType, LockType> MetadataStorageActionHandler<EntryType, StatusType, LogType, LockType> create( String entryType, MetadataStorageActionHandlerTypes<EntryType, StatusType, LogType, LockType> payloadTypes ) { return new MySQLMetadataStorageActionHandler<>( connector, jsonMapper, payloadTypes, entryType, config.getEntryTable(entryType), config.getLogTable(entryType), config.getLockTable(entryType) ); } }
@Override public void createTaskTables() { if (config.get().isCreateTables()) { final MetadataStorageTablesConfig tablesConfig = tablesConfigSupplier.get(); final String entryType = tablesConfig.getTaskEntryType(); createEntryTable(tablesConfig.getEntryTable(entryType)); createLogTable(tablesConfig.getLogTable(entryType), entryType); createLockTable(tablesConfig.getLockTable(entryType), entryType); } }
Assert.assertEquals( props.getProperty("druid.metadata.storage.tables.tasks"), config.getEntryTable(MetadataStorageTablesConfig.TASK_ENTRY_TYPE) ); Assert.assertEquals(
tables.add(tablesConfig.getLockTable(entryType)); tables.add(tablesConfig.getLogTable(entryType)); tables.add(tablesConfig.getEntryTable(entryType)); tables.add(tablesConfig.getAuditTable()); tables.add(tablesConfig.getSupervisorTable());
@Override public <EntryType, StatusType, LogType, LockType> MetadataStorageActionHandler<EntryType, StatusType, LogType, LockType> create( String entryType, MetadataStorageActionHandlerTypes<EntryType, StatusType, LogType, LockType> payloadTypes ) { return new PostgreSQLMetadataStorageActionHandler<>( connector, jsonMapper, payloadTypes, entryType, config.getEntryTable(entryType), config.getLogTable(entryType), config.getLockTable(entryType) ); } }
@Override public <EntryType, StatusType, LogType, LockType> MetadataStorageActionHandler<EntryType, StatusType, LogType, LockType> create( String entryType, MetadataStorageActionHandlerTypes<EntryType, StatusType, LogType, LockType> payloadTypes ) { return new SQLServerMetadataStorageActionHandler<>( connector, jsonMapper, payloadTypes, entryType, config.getEntryTable(entryType), config.getLogTable(entryType), config.getLockTable(entryType) ); } }
@Override public <EntryType, StatusType, LogType, LockType> MetadataStorageActionHandler<EntryType, StatusType, LogType, LockType> create( String entryType, MetadataStorageActionHandlerTypes<EntryType, StatusType, LogType, LockType> payloadTypes ) { return new MySQLMetadataStorageActionHandler<>( connector, jsonMapper, payloadTypes, entryType, config.getEntryTable(entryType), config.getLogTable(entryType), config.getLockTable(entryType) ); } }
@Override public <A, B, C, D> MetadataStorageActionHandler<A, B, C, D> create( final String entryType, MetadataStorageActionHandlerTypes<A, B, C, D> payloadTypes ) { return new DerbyMetadataStorageActionHandler<>( connector, jsonMapper, payloadTypes, entryType, config.getEntryTable(entryType), config.getLogTable(entryType), config.getLockTable(entryType) ); } }
@Override public void createTaskTables() { if (config.get().isCreateTables()) { final MetadataStorageTablesConfig tablesConfig = tablesConfigSupplier.get(); final String entryType = tablesConfig.getTaskEntryType(); createEntryTable(tablesConfig.getEntryTable(entryType)); createLogTable(tablesConfig.getLogTable(entryType), entryType); createLockTable(tablesConfig.getLockTable(entryType), entryType); } }