| Interface | Description |
|---|---|
| DBSplitter |
DBSplitter will generate DBInputSplits to use with DataDrivenDBInputFormat.
|
| DBWritable |
Objects that are read from/written to a database should implement
DBWritable. |
| Class | Description |
|---|---|
| BigDecimalSplitter |
Implement DBSplitter over BigDecimal values.
|
| BooleanSplitter |
Implement DBSplitter over boolean values.
|
| DataDrivenDBInputFormat<T extends DBWritable> |
A InputFormat that reads input data from an SQL table.
|
| DataDrivenDBInputFormat.DataDrivenDBInputSplit |
A InputSplit that spans a set of rows
|
| DataDrivenDBRecordReader<T extends DBWritable> |
A RecordReader that reads records from a SQL table,
using data-driven WHERE clause splits.
|
| DateSplitter |
Implement DBSplitter over date/time values.
|
| DBConfiguration |
A container for configuration property names for jobs with DB input/output.
|
| DBInputFormat<T extends DBWritable> |
A InputFormat that reads input data from an SQL table.
|
| DBInputFormat.DBInputSplit |
A InputSplit that spans a set of rows
|
| DBInputFormat.NullDBWritable |
A Class that does nothing, implementing DBWritable
|
| DBOutputFormat<K extends DBWritable,V> |
A OutputFormat that sends the reduce output to a SQL table.
|
| DBRecordReader<T extends DBWritable> |
A RecordReader that reads records from a SQL table.
|
| FloatSplitter |
Implement DBSplitter over floating-point values.
|
| IntegerSplitter |
Implement DBSplitter over integer values.
|
| MySQLDataDrivenDBRecordReader<T extends DBWritable> |
A RecordReader that reads records from a MySQL table via DataDrivenDBRecordReader
|
| MySQLDBRecordReader<T extends DBWritable> |
A RecordReader that reads records from a MySQL table.
|
| OracleDataDrivenDBInputFormat<T extends DBWritable> |
A InputFormat that reads input data from an SQL table in an Oracle db.
|
| OracleDataDrivenDBRecordReader<T extends DBWritable> |
A RecordReader that reads records from a Oracle table via DataDrivenDBRecordReader
|
| OracleDateSplitter |
Implement DBSplitter over date/time values returned by an Oracle db.
|
| OracleDBRecordReader<T extends DBWritable> |
A RecordReader that reads records from an Oracle SQL table.
|
| TextSplitter |
Implement DBSplitter over text strings.
|
This package contains a library to read records from a database as an input to a mapreduce job, and write the output records to the database.
The Database to access can be configured using the static methods in the DBConfiguration class. Jobs reading input from a database should use DBInputFormat#setInput() to set the configuration. And jobs writing its output to the database should use DBOutputFormat#setOutput().
Tuples from/to the database are converted to/from Java objects using DBWritable methods. Typically, for each table in the db, a class extending DBWritable is defined, which holds the fields of the tuple. The fields of a record are read from the database using DBWritable#readFields(ResultSet), and written to the database using DBWritable#write(PreparedStatament statement).
An example program using both DBInputFormat and DBOutputFormat can be found at src/examples/org/apache/hadoop/examples/DBCountPageview.java.
Copyright © 2009 The Apache Software Foundation