JdbcOutputFormat
@Deprecated public class JDBCOutputFormat extends AbstractJdbcOutputFormat<Row>
Modifier and Type | Class and Description |
---|---|
static class |
JDBCOutputFormat.JDBCOutputFormatBuilder
Deprecated.
Builder for
JDBCOutputFormat . |
connection, connectionProvider, DEFAULT_FLUSH_INTERVAL_MILLS, DEFAULT_FLUSH_MAX_SIZE
Constructor and Description |
---|
JDBCOutputFormat(String username,
String password,
String drivername,
String dbURL,
String query,
int batchInterval,
int[] typesArray)
Deprecated.
use
builder instead. |
Modifier and Type | Method and Description |
---|---|
static JDBCOutputFormat.JDBCOutputFormatBuilder |
buildJDBCOutputFormat()
Deprecated.
|
void |
close()
Deprecated.
Executes prepared statement and closes all resources of this instance.
|
void |
flush()
Deprecated.
|
int[] |
getFieldTypes()
Deprecated.
|
void |
open(int taskNumber,
int numTasks)
Deprecated.
Connects to the target database and initializes the prepared statement.
|
void |
writeRecord(Row row)
Deprecated.
Adds a record to the output.
|
configure, establishConnection, getConnection
getRuntimeContext, setRuntimeContext
public void open(int taskNumber, int numTasks) throws IOException
open
in interface OutputFormat<Row>
open
in class AbstractJdbcOutputFormat<Row>
taskNumber
- The number of the parallel instance.numTasks
- The number of parallel tasks.IOException
- Thrown, if the output could not be opened due to an I/O problem.public void writeRecord(Row row)
OutputFormat
When this method is called, the output format it guaranteed to be opened.
row
- The records to add to the output.public void flush()
flush
in interface Flushable
flush
in class AbstractJdbcOutputFormat<Row>
public void close()
close
in interface OutputFormat<Row>
close
in class AbstractJdbcOutputFormat<Row>
public static JDBCOutputFormat.JDBCOutputFormatBuilder buildJDBCOutputFormat()
public int[] getFieldTypes()
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.