Class MySQLDBRecordReader<T extends DBWritable>
java.lang.Object
org.apache.hadoop.mapreduce.RecordReader<LongWritable,T>
org.apache.hadoop.mapreduce.lib.db.DBRecordReader<T>
org.apache.hadoop.mapreduce.lib.db.MySQLDBRecordReader<T>
- All Implemented Interfaces:
Closeable,AutoCloseable
A RecordReader that reads records from a MySQL table.
-
Field Summary
Fields inherited from class org.apache.hadoop.mapreduce.lib.db.DBRecordReader
statement -
Constructor Summary
ConstructorsConstructorDescriptionMySQLDBRecordReader(org.apache.hadoop.mapreduce.lib.db.DBInputFormat.DBInputSplit split, Class<T> inputClass, Configuration conf, Connection conn, DBConfiguration dbConfig, String cond, String[] fields, String table) -
Method Summary
Methods inherited from class org.apache.hadoop.mapreduce.lib.db.DBRecordReader
close, createValue, getConditions, getConnection, getCurrentKey, getCurrentValue, getDBConf, getFieldNames, getPos, getProgress, getSelectQuery, getSplit, getStatement, getTableName, initialize, next, nextKeyValue, setStatement
-
Constructor Details
-
MySQLDBRecordReader
public MySQLDBRecordReader(org.apache.hadoop.mapreduce.lib.db.DBInputFormat.DBInputSplit split, Class<T> inputClass, Configuration conf, Connection conn, DBConfiguration dbConfig, String cond, String[] fields, String table) throws SQLException - Throws:
SQLException
-
-
Method Details
-
executeQuery
- Overrides:
executeQueryin classDBRecordReader<T extends DBWritable>- Throws:
SQLException
-