OUT - public class JDBCOutputFormat<OUT extends Tuple> extends Object implements OutputFormat<OUT>
Tuple,
DriverManager,
Serialized Form| Modifier and Type | Class and Description |
|---|---|
static class |
JDBCOutputFormat.JDBCOutputFormatBuilder |
| Constructor and Description |
|---|
JDBCOutputFormat() |
| Modifier and Type | Method and Description |
|---|---|
static JDBCOutputFormat.JDBCOutputFormatBuilder |
buildJDBCOutputFormat() |
void |
close()
Executes prepared statement and closes all resources of this instance.
|
void |
configure(Configuration parameters) |
void |
open(int taskNumber,
int numTasks)
Connects to the target database and initializes the prepared statement.
|
void |
writeRecord(OUT tuple)
Adds a record to the prepared statement.
|
public void configure(Configuration parameters)
configure in interface OutputFormat<OUT extends Tuple>public void open(int taskNumber,
int numTasks)
throws IOException
open in interface OutputFormat<OUT extends Tuple>taskNumber - The number of the parallel instance.IOException - Thrown, if the output could not be opened due to an
I/O problem.public void writeRecord(OUT tuple) throws IOException
When this method is called, the output format is guaranteed to be opened.
writeRecord in interface OutputFormat<OUT extends Tuple>tuple - The records to add to the output.IOException - Thrown, if the records could not be added due to an I/O problem.public void close()
throws IOException
close in interface OutputFormat<OUT extends Tuple>IOException - Thrown, if the input could not be closed properly.public static JDBCOutputFormat.JDBCOutputFormatBuilder buildJDBCOutputFormat()
Copyright © 2015 The Apache Software Foundation. All rights reserved.