org.apache.hadoop.mapred.lib.db (Hadoop 0.20.1+169.88 API)
Date: 2010-05-20

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES

## Package org.apache.hadoop.mapred.lib.db

org.apache.hadoop.mapred.lib.db Package

See:
Description

Interface Summary
DBWritable | Deprecated. Use `DBWritable` instead

Class Summary
DBConfiguration | Deprecated. Use `DBConfiguration` instead
DBInputFormat<T extends DBWritable> | Deprecated. Use `DBInputFormat` instead.
DBInputFormat.DBInputSplit | A InputSplit that spans a set of rows
DBInputFormat.NullDBWritable | A Class that does nothing, implementing DBWritable
DBOutputFormat<K extends DBWritable,V> | Deprecated. Use org.apache.hadoop.mapreduce.lib.db.DBOutputFormat instead

## Package org.apache.hadoop.mapred.lib.db Description

## org.apache.hadoop.mapred.lib.db Package

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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES

Copyright © 2009 The Apache Software Foundation