Class DBInputFormat<T extends DBWritable>

java.lang.Object
org.apache.hadoop.mapreduce.InputFormat<LongWritable,T>
org.apache.hadoop.mapreduce.lib.db.DBInputFormat<T>
All Implemented Interfaces:
Configurable
Direct Known Subclasses:
DataDrivenDBInputFormat, DBInputFormat

@Public @Stable public class DBInputFormat<T extends DBWritable> extends InputFormat<LongWritable,T> implements Configurable
A InputFormat that reads input data from an SQL table.

DBInputFormat emits LongWritables containing the record number as key and DBWritables as value. The SQL query, and input class can be using one of the two setInput methods.

  • Field Details

    • dbProductName

      protected String dbProductName
    • conditions

      protected String conditions
    • connection

      protected Connection connection
    • tableName

      protected String tableName
    • fieldNames

      protected String[] fieldNames
    • dbConf

      protected DBConfiguration dbConf
  • Constructor Details

    • DBInputFormat

      public DBInputFormat()
  • Method Details