public class DBOutputFormat.DBRecordWriter extends RecordWriter<K,V>
| Constructor and Description |
|---|
DBOutputFormat.DBRecordWriter() |
DBOutputFormat.DBRecordWriter(java.sql.Connection connection,
java.sql.PreparedStatement statement) |
| Modifier and Type | Method and Description |
|---|---|
void |
close(TaskAttemptContext context)
Close this
RecordWriter to future operations. |
java.sql.Connection |
getConnection() |
java.sql.PreparedStatement |
getStatement() |
void |
write(K key,
V value)
Writes a key/value pair.
|
public DBOutputFormat.DBRecordWriter()
throws java.sql.SQLException
java.sql.SQLExceptionpublic DBOutputFormat.DBRecordWriter(java.sql.Connection connection,
java.sql.PreparedStatement statement)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.sql.Connection getConnection()
public java.sql.PreparedStatement getStatement()
public void close(TaskAttemptContext context) throws java.io.IOException
RecordWriter to future operations.close in class RecordWriter<K extends DBWritable,V>context - the context of the taskjava.io.IOExceptionpublic void write(K key, V value) throws java.io.IOException
write in class RecordWriter<K extends DBWritable,V>key - the key to write.value - the value to write.java.io.IOExceptionCopyright © 2009 The Apache Software Foundation