public class JDBCOutputFormat extends AbstractJDBCOutputFormat<org.apache.flink.types.Row>
Row,
DriverManager,
序列化表格| 限定符和类型 | 类和说明 |
|---|---|
static class |
JDBCOutputFormat.JDBCOutputFormatBuilder
Builder for a
JDBCOutputFormat. |
connection, dbURL| 构造器和说明 |
|---|
JDBCOutputFormat(String username,
String password,
String drivername,
String dbURL,
String query,
int batchInterval,
int[] typesArray) |
| 限定符和类型 | 方法和说明 |
|---|---|
static JDBCOutputFormat.JDBCOutputFormatBuilder |
buildJDBCOutputFormat() |
void |
close()
Executes prepared statement and closes all resources of this instance.
|
void |
open(int taskNumber,
int numTasks)
Connects to the target database and initializes the prepared statement.
|
void |
writeRecord(org.apache.flink.types.Row row) |
closeDbConnection, configure, establishConnectionpublic void open(int taskNumber,
int numTasks)
throws IOException
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(org.apache.flink.types.Row row)
throws IOException
IOExceptionpublic void close()
throws IOException
IOException - Thrown, if the input could not be closed properly.public static JDBCOutputFormat.JDBCOutputFormatBuilder buildJDBCOutputFormat()
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.