@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
SQLException
public DBRecordWriter(Connection connection, PreparedStatement statement) throws SQLException
SQLException
public 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 taskIOException
public 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.IOException
Copyright © 2017 Apache Software Foundation. All Rights Reserved.