org.apache.hadoop.mapreduce.lib.db
Class MySQLDBRecordReader<T extends DBWritable>

java.lang.Object
  extended by org.apache.hadoop.mapreduce.RecordReader<LongWritable,T>
      extended by org.apache.hadoop.mapreduce.lib.db.DBRecordReader<T>
          extended by org.apache.hadoop.mapreduce.lib.db.MySQLDBRecordReader<T>
All Implemented Interfaces:
Closeable

@InterfaceAudience.Public
@InterfaceStability.Evolving
public class MySQLDBRecordReader<T extends DBWritable>
extends DBRecordReader<T>

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
MySQLDBRecordReader(DBInputFormat.DBInputSplit split, Class<T> inputClass, Configuration conf, Connection conn, DBConfiguration dbConfig, String cond, String[] fields, String table)
           
 
Method Summary
protected  ResultSet executeQuery(String query)
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MySQLDBRecordReader

public MySQLDBRecordReader(DBInputFormat.DBInputSplit split,
                           Class<T> inputClass,
                           Configuration conf,
                           Connection conn,
                           DBConfiguration dbConfig,
                           String cond,
                           String[] fields,
                           String table)
                    throws SQLException
Throws:
SQLException
Method Detail

executeQuery

protected ResultSet executeQuery(String query)
                          throws SQLException
Overrides:
executeQuery in class DBRecordReader<T extends DBWritable>
Throws:
SQLException


Copyright © 2009 The Apache Software Foundation