From 2bda1af3656351aa08524ec3e1824f2a8ed62b6e Mon Sep 17 00:00:00 2001 From: Randy Gelhausen Date: Sat, 19 Sep 2015 17:52:29 -0400 Subject: [PATCH 1/2] Added note about use of com.google.common.collect classes, corrected "map" to "hikariConfigMap" in examples --- external/storm-jdbc/README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/external/storm-jdbc/README.md b/external/storm-jdbc/README.md index 419e9f6d38e..060728dd601 100644 --- a/external/storm-jdbc/README.md +++ b/external/storm-jdbc/README.md @@ -3,14 +3,16 @@ Storm/Trident integration for JDBC. This package includes the core bolts and tri to either insert storm tuples in a database table or to execute select queries against a database and enrich tuples in a storm topology. +**Note**: Throughout the examples below, we make use of com.google.common.collect.Lists and com.google.common.collect.Maps. + ## Inserting into a database. The bolt and trident state included in this package for inserting data into a database tables are tied to a single table. ### ConnectionProvider -An interface that should be implemented by different connection pooling mechanism `org.apache.storm.jdbc.common.ConnectionProvider` +An interface that should be implemented by different connection pooling mechanism `org.apache.storm.jdbc.common.ConnectionPrvoider` ```java -public interface ConnectionProvider extends Serializable { +public interface ConnectionPrvoider extends Serializable { /** * method must be idempotent. */ @@ -62,7 +64,7 @@ hikariConfigMap.put("dataSourceClassName","com.mysql.jdbc.jdbc2.optional.MysqlDa hikariConfigMap.put("dataSource.url", "jdbc:mysql://localhost/test"); hikariConfigMap.put("dataSource.user","root"); hikariConfigMap.put("dataSource.password","password"); -ConnectionProvider connectionProvider = new HikariCPConnectionProvider(map); +ConnectionProvider connectionProvider = new HikariCPConnectionProvider(hikariConfigMap); String tableName = "user_details"; JdbcMapper simpleJdbcMapper = new SimpleJdbcMapper(tableName, connectionProvider); From 4ad30fc48caa6929179c4be07feebc08c8990dec Mon Sep 17 00:00:00 2001 From: Randy Gelhausen Date: Sun, 20 Sep 2015 18:02:18 -0400 Subject: [PATCH 2/2] fixed Prvoider to Provider --- external/storm-jdbc/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/external/storm-jdbc/README.md b/external/storm-jdbc/README.md index 060728dd601..f64d8d91037 100644 --- a/external/storm-jdbc/README.md +++ b/external/storm-jdbc/README.md @@ -9,10 +9,10 @@ in a storm topology. The bolt and trident state included in this package for inserting data into a database tables are tied to a single table. ### ConnectionProvider -An interface that should be implemented by different connection pooling mechanism `org.apache.storm.jdbc.common.ConnectionPrvoider` +An interface that should be implemented by different connection pooling mechanism `org.apache.storm.jdbc.common.ConnectionProvider` ```java -public interface ConnectionPrvoider extends Serializable { +public interface ConnectionProvider extends Serializable { /** * method must be idempotent. */