@InterfaceStability.Evolving public class DBOutputFormat.DBRecordWriter extends RecordWriter<K,V>
| Constructor and Description |
|---|
DBRecordWriter() |
DBRecordWriter(Connection connection,
PreparedStatement statement) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
public DBRecordWriter()
throws SQLException
SQLExceptionpublic DBRecordWriter(Connection connection, PreparedStatement statement) throws SQLException
SQLExceptionpublic Connection getConnection()
public PreparedStatement getStatement()
public void close(TaskAttemptContext context) throws IOException
RecordWriter to future operations.close in class RecordWriter<K extends DBWritable,V>context - the context of the taskIOExceptionpublic void write(K key, V value) throws IOException
write in class RecordWriter<K extends DBWritable,V>key - the key to write.value - the value to write.IOExceptionCopyright © 2008–2022 Apache Software Foundation. All rights reserved.