public class JdbcInsertBolt extends AbstractJdbcBolt
Basic bolt for writing to any Database table.
Note: Each JdbcInsertBolt defined in a topology is tied to a specific table.collector, configKey, connectionProvider, jdbcClient, queryTimeoutSecs| Constructor and Description |
|---|
JdbcInsertBolt(ConnectionProvider connectionProvider,
JdbcMapper jdbcMapper) |
| Modifier and Type | Method and Description |
|---|---|
void |
declareOutputFields(OutputFieldsDeclarer outputFieldsDeclarer) |
void |
prepare(Map map,
TopologyContext topologyContext,
OutputCollector collector) |
protected void |
process(Tuple tuple) |
JdbcInsertBolt |
withInsertQuery(String insertQuery) |
JdbcInsertBolt |
withQueryTimeoutSecs(int queryTimeoutSecs) |
JdbcInsertBolt |
withTableName(String tableName) |
cleanupexecute, onTickTuplegetComponentConfigurationclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetComponentConfigurationpublic JdbcInsertBolt(ConnectionProvider connectionProvider, JdbcMapper jdbcMapper)
public JdbcInsertBolt withTableName(String tableName)
public JdbcInsertBolt withInsertQuery(String insertQuery)
public JdbcInsertBolt withQueryTimeoutSecs(int queryTimeoutSecs)
public void prepare(Map map, TopologyContext topologyContext, OutputCollector collector)
prepare in interface IBoltprepare in class AbstractJdbcBoltprotected void process(Tuple tuple)
process in class BaseTickTupleAwareRichBoltpublic void declareOutputFields(OutputFieldsDeclarer outputFieldsDeclarer)
Copyright © 2018 The Apache Software Foundation. All Rights Reserved.