public static class JdbcOutputFormat.Builder extends Object
JdbcOutputFormat.| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
JdbcOutputFormat<org.apache.flink.api.java.tuple.Tuple2<Boolean,org.apache.flink.types.Row>,org.apache.flink.types.Row,JdbcBatchStatementExecutor<org.apache.flink.types.Row>> |
build()
Finalizes the configuration and checks validity.
|
JdbcOutputFormat.Builder |
setFieldNames(String[] fieldNames)
required, field names of this jdbc sink.
|
JdbcOutputFormat.Builder |
setFieldTypes(int[] fieldTypes)
required, field types of this jdbc sink.
|
JdbcOutputFormat.Builder |
setFlushIntervalMills(long flushIntervalMills)
optional, flush interval mills, over this time, asynchronous threads will flush data.
|
JdbcOutputFormat.Builder |
setFlushMaxSize(int flushMaxSize)
optional, flush max size (includes all append, upsert and delete records), over this
number of records, will flush data.
|
JdbcOutputFormat.Builder |
setKeyFields(String[] keyFields)
required, upsert unique keys.
|
JdbcOutputFormat.Builder |
setMaxRetryTimes(int maxRetryTimes)
optional, max retry times for jdbc connector.
|
JdbcOutputFormat.Builder |
setOptions(InternalJdbcConnectionOptions options)
required, jdbc options.
|
public JdbcOutputFormat.Builder setOptions(InternalJdbcConnectionOptions options)
public JdbcOutputFormat.Builder setFieldNames(String[] fieldNames)
public JdbcOutputFormat.Builder setKeyFields(String[] keyFields)
public JdbcOutputFormat.Builder setFieldTypes(int[] fieldTypes)
public JdbcOutputFormat.Builder setFlushMaxSize(int flushMaxSize)
public JdbcOutputFormat.Builder setFlushIntervalMills(long flushIntervalMills)
public JdbcOutputFormat.Builder setMaxRetryTimes(int maxRetryTimes)
public JdbcOutputFormat<org.apache.flink.api.java.tuple.Tuple2<Boolean,org.apache.flink.types.Row>,org.apache.flink.types.Row,JdbcBatchStatementExecutor<org.apache.flink.types.Row>> build()
Copyright © 2022–2024 The Apache Software Foundation. All rights reserved.