Search in sources :

Example 1 with JdbcStorageManager

use of com.hortonworks.registries.storage.impl.jdbc.JdbcStorageManager in project registry by hortonworks.

the class DbFileStorageTest method setUp.

@Before
public void setUp() throws Exception {
    connectionBuilder = new HikariCPConnectionBuilder(HikariBasicConfig.getH2HikariConfig());
    MySqlExecutor queryExecutor = new MySqlExecutor(new ExecutionConfig(-1), connectionBuilder);
    StorageManager jdbcStorageManager = new JdbcStorageManager(queryExecutor);
    transactionManager = (TransactionManager) jdbcStorageManager;
    jdbcStorageManager.registerStorables(StorageUtils.getStorableEntities());
    dbFileStorage = new DbFileStorage();
    dbFileStorage.setStorageManager(jdbcStorageManager);
    runScript("create_fileblob.sql");
}
Also used : HikariCPConnectionBuilder(com.hortonworks.registries.storage.impl.jdbc.connection.HikariCPConnectionBuilder) MySqlExecutor(com.hortonworks.registries.storage.impl.jdbc.provider.mysql.factory.MySqlExecutor) JdbcStorageManager(com.hortonworks.registries.storage.impl.jdbc.JdbcStorageManager) StorageManager(com.hortonworks.registries.storage.StorageManager) ExecutionConfig(com.hortonworks.registries.storage.impl.jdbc.config.ExecutionConfig) JdbcStorageManager(com.hortonworks.registries.storage.impl.jdbc.JdbcStorageManager) Before(org.junit.Before)

Example 2 with JdbcStorageManager

use of com.hortonworks.registries.storage.impl.jdbc.JdbcStorageManager in project registry by hortonworks.

the class TransactionTest method setUp.

@Before
public void setUp() throws Exception {
    connectionBuilder = new HikariCPConnectionBuilder(HikariBasicConfig.getH2HikariConfig());
    MySqlExecutor queryExecutor = new MySqlExecutor(new ExecutionConfig(-1), connectionBuilder);
    StorageManager jdbcStorageManager = new JdbcStorageManager(queryExecutor);
    transactionManager = (TransactionManager) jdbcStorageManager;
    jdbcStorageManager.registerStorables(StorageUtils.getStorableEntities());
    dbFileStorage = new DbFileStorage();
    dbFileStorage.setStorageManager(jdbcStorageManager);
    runScript("create_fileblob.sql");
}
Also used : HikariCPConnectionBuilder(com.hortonworks.registries.storage.impl.jdbc.connection.HikariCPConnectionBuilder) MySqlExecutor(com.hortonworks.registries.storage.impl.jdbc.provider.mysql.factory.MySqlExecutor) JdbcStorageManager(com.hortonworks.registries.storage.impl.jdbc.JdbcStorageManager) StorageManager(com.hortonworks.registries.storage.StorageManager) ExecutionConfig(com.hortonworks.registries.storage.impl.jdbc.config.ExecutionConfig) JdbcStorageManager(com.hortonworks.registries.storage.impl.jdbc.JdbcStorageManager) Before(org.junit.Before)

Aggregations

StorageManager (com.hortonworks.registries.storage.StorageManager)2 JdbcStorageManager (com.hortonworks.registries.storage.impl.jdbc.JdbcStorageManager)2 ExecutionConfig (com.hortonworks.registries.storage.impl.jdbc.config.ExecutionConfig)2 HikariCPConnectionBuilder (com.hortonworks.registries.storage.impl.jdbc.connection.HikariCPConnectionBuilder)2 MySqlExecutor (com.hortonworks.registries.storage.impl.jdbc.provider.mysql.factory.MySqlExecutor)2 Before (org.junit.Before)2