DBOutputFormat.DBRecordWriter (Hadoop 0.20.2-cdh3u5 API)
Date: 2012-10-05

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.hadoop.mapreduce.lib.db
Class DBOutputFormat.DBRecordWriter

    java.lang.Object
      org.apache.hadoop.mapreduce.RecordWriter<K,V>
          org.apache.hadoop.mapreduce.lib.db.DBOutputFormat.DBRecordWriter

Direct Known Subclasses:
  DBOutputFormat.DBRecordWriter

Enclosing class:
  DBOutputFormat<K extends DBWritable,V>

    public class DBOutputFormat.DBRecordWriter

extends RecordWriter<K,V>

A RecordWriter that writes the reduce output to a SQL table

Constructor Summary
`DBOutputFormat.DBRecordWriter()`
`DBOutputFormat.DBRecordWriter(Connection connection, PreparedStatement statement)`

Method Summary
`void` | `close(TaskAttemptContext context)` Close this `RecordWriter` to future operations.
`Connection` | `getConnection()`
`PreparedStatement` | `getStatement()`
`void` | `write(K key, V value)` Writes a key/value pair.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DBOutputFormat.DBRecordWriter

    public DBOutputFormat.DBRecordWriter()
                                  throws SQLException

Throws:
  `SQLException`

### DBOutputFormat.DBRecordWriter

    public DBOutputFormat.DBRecordWriter(Connection connection,
                                         PreparedStatement statement)
                                  throws SQLException

Throws:
  `SQLException`

Method Detail

### getConnection

    public Connection getConnection()

### getStatement

    public PreparedStatement getStatement()

### close

    public void close(TaskAttemptContext context)
               throws IOException

  Close this `RecordWriter` to future operations.

  Specified by:
    `close` in class `RecordWriter<K extends DBWritable,V>`
  Parameters:
    `context` - the context of the task
  Throws:
    `IOException`

### write

    public void write(K key,
                      V value)
               throws IOException

  Writes a key/value pair.

  Specified by:
    `write` in class `RecordWriter<K extends DBWritable,V>`
  Parameters:
    `key` - the key to write.
    `value` - the value to write.
  Throws:
    `IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation