OUT - public class JDBCOutputFormat<OUT extends org.apache.flink.api.java.tuple.Tuple> extends Object implements org.apache.flink.api.common.io.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(org.apache.flink.configuration.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(org.apache.flink.configuration.Configuration parameters)
configure in interface org.apache.flink.api.common.io.OutputFormat<OUT extends org.apache.flink.api.java.tuple.Tuple>public void open(int taskNumber,
int numTasks)
throws IOException
open in interface org.apache.flink.api.common.io.OutputFormat<OUT extends org.apache.flink.api.java.tuple.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 org.apache.flink.api.common.io.OutputFormat<OUT extends org.apache.flink.api.java.tuple.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 org.apache.flink.api.common.io.OutputFormat<OUT extends org.apache.flink.api.java.tuple.Tuple>IOException - Thrown, if the input could not be closed properly.public static JDBCOutputFormat.JDBCOutputFormatBuilder buildJDBCOutputFormat()
Copyright © 2014–2015 The Apache Software Foundation. All rights reserved.