Package org.apache.storm.jdbc.bolt

## Class JdbcLookupBolt

- java.lang.Object
- - org.apache.storm.topology.base.BaseComponent
  - - org.apache.storm.topology.base.BaseRichBolt
    - - org.apache.storm.topology.base.BaseTickTupleAwareRichBolt
      - - org.apache.storm.jdbc.bolt.AbstractJdbcBolt
        - - org.apache.storm.jdbc.bolt.JdbcLookupBolt

- All Implemented Interfaces:
    `Serializable`, `IBolt`, `IComponent`, `IRichBolt`

      public class JdbcLookupBolt
      extends AbstractJdbcBolt

  Basic bolt for querying from any database.
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class org.apache.storm.jdbc.bolt.AbstractJdbcBolt

      `collector, configKey, connectionProvider, jdbcClient, queryTimeoutSecs`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `JdbcLookupBolt​(ConnectionProvider connectionProvider, String selectQuery, JdbcLookupMapper jdbcLookupMapper)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `declareOutputFields​(OutputFieldsDeclarer outputFieldsDeclarer)` | Declare the output schema for all the streams of this topology.
    `protected void` | `process​(Tuple tuple)` | Process a single non-tick tuple of input.
    `JdbcLookupBolt` | `withQueryTimeoutSecs​(int queryTimeoutSecs)` |

    - ### Methods inherited from class org.apache.storm.jdbc.bolt.AbstractJdbcBolt

      `cleanup, prepare`

    - ### Methods inherited from class org.apache.storm.topology.base.BaseTickTupleAwareRichBolt

      `execute, onTickTuple`

    - ### Methods inherited from class org.apache.storm.topology.base.BaseComponent

      `getComponentConfiguration`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.apache.storm.topology.IComponent

      `getComponentConfiguration`

- - ### Constructor Detail

    - #### JdbcLookupBolt

          public JdbcLookupBolt​(ConnectionProvider connectionProvider,
                                String selectQuery,
                                JdbcLookupMapper jdbcLookupMapper)

  - ### Method Detail

    - #### withQueryTimeoutSecs

          public JdbcLookupBolt withQueryTimeoutSecs​(int queryTimeoutSecs)

    - #### process

          protected void process​(Tuple tuple)

      Description copied from class: `BaseTickTupleAwareRichBolt`
      Process a single non-tick tuple of input. Implementation needs to handle ack manually. More details on `IBolt.execute(Tuple)`.
      Specified by:
        `process` in class `BaseTickTupleAwareRichBolt`
      Parameters:
        `tuple` - The input tuple to be processed.

    - #### declareOutputFields

          public void declareOutputFields​(OutputFieldsDeclarer outputFieldsDeclarer)

      Description copied from interface: `IComponent`
      Declare the output schema for all the streams of this topology.
      Parameters:
        `outputFieldsDeclarer` - this is used to declare output stream ids, output fields, and whether or not each output stream is a direct stream