org.apache.hadoop.mapred.lib.db

## Class DBOutputFormat.DBRecordWriter

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

- All Implemented Interfaces:
    RecordWriter<K,V>
  Enclosing class:
    DBOutputFormat<K extends DBWritable,V>

      protected class DBOutputFormat.DBRecordWriter
      extends DBOutputFormat.DBRecordWriter
      implements RecordWriter<K,V>

  A RecordWriter that writes the reduce output to a SQL table

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `DBRecordWriter(Connection connection, PreparedStatement statement)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close(Reporter reporter)` Close this `RecordWriter` to future operations.

    - ### Methods inherited from class org.apache.hadoop.mapreduce.lib.db.DBOutputFormat.DBRecordWriter

      `close, getConnection, getStatement, write`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.apache.hadoop.mapred.RecordWriter

      `write`

- - ### Constructor Detail

    - #### DBRecordWriter

          protected DBRecordWriter(Connection connection,
                                   PreparedStatement statement)
                            throws SQLException

      Throws:
        `SQLException`

  - ### Method Detail

    - #### close

          public void close(Reporter reporter)
                     throws IOException

      Close this `RecordWriter` to future operations.
      Specified by:
        `close` in interface `RecordWriter<K extends DBWritable,V>`
      Parameters:
        `reporter` - facility to report progress.
      Throws:
        `IOException`

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.