Search in sources :

Example 1 with ExecutionConfig

use of com.hortonworks.registries.storage.impl.jdbc.config.ExecutionConfig 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 ExecutionConfig

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

the class MySqlStorageManagerWithCacheIntegrationTest method setFields.

private void setFields(ConnectionBuilder connectionBuilder, Database db) {
    JdbcStorageManagerIntegrationTest.connectionBuilder = connectionBuilder;
    jdbcStorageManager = createJdbcStorageManager(new MySqlExecutor(new ExecutionConfig(-1), connectionBuilder, newGuavaCacheBuilder()));
    database = db;
}
Also used : MySqlExecutor(com.hortonworks.registries.storage.impl.jdbc.provider.mysql.factory.MySqlExecutor) ExecutionConfig(com.hortonworks.registries.storage.impl.jdbc.config.ExecutionConfig)

Example 3 with ExecutionConfig

use of com.hortonworks.registries.storage.impl.jdbc.config.ExecutionConfig 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)

Example 4 with ExecutionConfig

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

the class AbstractMySqlStorageManagerNoCacheIntegrationTest method setFields.

private void setFields(ConnectionBuilder connectionBuilder, Database db) {
    JdbcStorageManagerIntegrationTest.connectionBuilder = connectionBuilder;
    jdbcStorageManager = createJdbcStorageManager(new MySqlExecutor(new ExecutionConfig(-1), connectionBuilder));
    database = db;
}
Also used : MySqlExecutor(com.hortonworks.registries.storage.impl.jdbc.provider.mysql.factory.MySqlExecutor) ExecutionConfig(com.hortonworks.registries.storage.impl.jdbc.config.ExecutionConfig)

Example 5 with ExecutionConfig

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

the class AbstractMySqlStorageManagerWithCacheIntegrationTest method setFields.

private void setFields(ConnectionBuilder connectionBuilder, Database db) {
    JdbcStorageManagerIntegrationTest.connectionBuilder = connectionBuilder;
    jdbcStorageManager = createJdbcStorageManager(new MySqlExecutor(new ExecutionConfig(-1), connectionBuilder, newGuavaCacheBuilder()));
    database = db;
}
Also used : MySqlExecutor(com.hortonworks.registries.storage.impl.jdbc.provider.mysql.factory.MySqlExecutor) ExecutionConfig(com.hortonworks.registries.storage.impl.jdbc.config.ExecutionConfig)

Aggregations

ExecutionConfig (com.hortonworks.registries.storage.impl.jdbc.config.ExecutionConfig)10 MySqlExecutor (com.hortonworks.registries.storage.impl.jdbc.provider.mysql.factory.MySqlExecutor)7 HikariCPConnectionBuilder (com.hortonworks.registries.storage.impl.jdbc.connection.HikariCPConnectionBuilder)3 SQLException (java.sql.SQLException)3 StorageManager (com.hortonworks.registries.storage.StorageManager)2 JdbcStorageManager (com.hortonworks.registries.storage.impl.jdbc.JdbcStorageManager)2 CaseAgnosticStringSet (com.hortonworks.registries.storage.impl.jdbc.util.CaseAgnosticStringSet)2 Connection (java.sql.Connection)2 ResultSetMetaData (java.sql.ResultSetMetaData)2 Before (org.junit.Before)2 OracleExecutor (com.hortonworks.registries.storage.impl.jdbc.provider.oracle.factory.OracleExecutor)1 OracleSelectQuery (com.hortonworks.registries.storage.impl.jdbc.provider.oracle.query.OracleSelectQuery)1 PostgresqlExecutor (com.hortonworks.registries.storage.impl.jdbc.provider.postgresql.factory.PostgresqlExecutor)1 QueryExecutor (com.hortonworks.registries.storage.impl.jdbc.provider.sql.factory.QueryExecutor)1 SqlSelectQuery (com.hortonworks.registries.storage.impl.jdbc.provider.sql.query.SqlSelectQuery)1 ResultSet (java.sql.ResultSet)1