public class AppendOnlyWriter extends Object implements JDBCWriter
| Constructor and Description |
|---|
AppendOnlyWriter(String insertSQL,
int[] fieldTypes) |
| Modifier and Type | Method and Description |
|---|---|
void |
addRecord(org.apache.flink.api.java.tuple.Tuple2<Boolean,org.apache.flink.types.Row> record)
Add record to writer, the writer may cache the data.
|
void |
close()
Close JDBC related statements and other classes.
|
void |
executeBatch()
Submits a batch of commands to the database for execution.
|
void |
open(Connection connection)
Open the writer by JDBC Connection.
|
public AppendOnlyWriter(String insertSQL, int[] fieldTypes)
public void open(Connection connection) throws SQLException
JDBCWriteropen in interface JDBCWriterSQLExceptionpublic void addRecord(org.apache.flink.api.java.tuple.Tuple2<Boolean,org.apache.flink.types.Row> record) throws SQLException
JDBCWriteraddRecord in interface JDBCWriterSQLExceptionpublic void executeBatch()
throws SQLException
JDBCWriterexecuteBatch in interface JDBCWriterSQLExceptionpublic void close()
throws SQLException
JDBCWriterclose in interface JDBCWriterSQLExceptionCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.