Search in sources :

Example 1 with JdbcLookupMapper

use of org.apache.storm.jdbc.mapper.JdbcLookupMapper in project storm by apache.

the class JdbcLookupBoltTest method testValidation.

@Test
public void testValidation() {
    ConnectionProvider provider = new HikariCPConnectionProvider(new HashMap<String, Object>());
    JdbcLookupMapper mapper = new SimpleJdbcLookupMapper(new Fields("test"), Lists.newArrayList(new Column("test", 0)));
    String selectQuery = "select * from dual";
    expectIllegaArgs(null, selectQuery, mapper);
    expectIllegaArgs(provider, null, mapper);
    expectIllegaArgs(provider, selectQuery, null);
}
Also used : SimpleJdbcLookupMapper(org.apache.storm.jdbc.mapper.SimpleJdbcLookupMapper) Fields(org.apache.storm.tuple.Fields) Column(org.apache.storm.jdbc.common.Column) JdbcLookupMapper(org.apache.storm.jdbc.mapper.JdbcLookupMapper) SimpleJdbcLookupMapper(org.apache.storm.jdbc.mapper.SimpleJdbcLookupMapper) HikariCPConnectionProvider(org.apache.storm.jdbc.common.HikariCPConnectionProvider) ConnectionProvider(org.apache.storm.jdbc.common.ConnectionProvider) HikariCPConnectionProvider(org.apache.storm.jdbc.common.HikariCPConnectionProvider) Test(org.junit.Test)

Aggregations

Column (org.apache.storm.jdbc.common.Column)1 ConnectionProvider (org.apache.storm.jdbc.common.ConnectionProvider)1 HikariCPConnectionProvider (org.apache.storm.jdbc.common.HikariCPConnectionProvider)1 JdbcLookupMapper (org.apache.storm.jdbc.mapper.JdbcLookupMapper)1 SimpleJdbcLookupMapper (org.apache.storm.jdbc.mapper.SimpleJdbcLookupMapper)1 Fields (org.apache.storm.tuple.Fields)1 Test (org.junit.Test)1