[ 
https://issues.apache.org/jira/browse/FLINK-22141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17321934#comment-17321934
 ] 

Yuan Mei commented on FLINK-22141:
----------------------------------

Couple of things found related to documentation when writing test cases 
following 
https://ci.apache.org/projects/flink/flink-docs-master/docs/connectors/datastream/jdbc/

1. Within the section of "JDBC Connector", I think we need to provide explicit 
instructions of adding JDBC driver, similar to here in "JDBC SQL Connector" 
https://ci.apache.org/projects/flink/flink-docs-master/docs/connectors/table/jdbc/

instead of simply:
To use it, add the following dependency to your project (along with your JDBC 
driver)

2. For JDBC.sink
I can set up a pipeline running in cluster connecting to postgres and verify 
results
with JDBC.sink following the instruction, (so this part looks fine to me)

3. For JDBC.exactlyOnceSink, couple of suggestions:
3.1 Change "getDbMetadata().getUrl()" and "getDbMetadata().getDriverClass()" to 
something more friendly, because I can not find no where in the doc what 
getDbMetadata() is; 

We can change to something similar to the follwing:
                                
{code:java}
                                
.withUrl("jdbc:postgresql://localhost:5432/postgres")
                                .withDriverName("org.postgresql.Driver")
{code}

3.2 `JDBC.exactlyOnceSink` has a input arg `JdbcConnectionOptions 
connectionOptions` never used, so I guess connection info is provided by 
XADataSource. So do we consider remove `JdbcConnectionOptions 
connectionOptions`, it is not used and my confuse users?

3.3 Example of how to create XADataSource for supported dbs







> Manually test exactly-once JDBC sink
> ------------------------------------
>
>                 Key: FLINK-22141
>                 URL: https://issues.apache.org/jira/browse/FLINK-22141
>             Project: Flink
>          Issue Type: Test
>          Components: Connectors / JDBC
>            Reporter: Roman Khachatryan
>            Assignee: Yuan Mei
>            Priority: Blocker
>              Labels: release-testing
>             Fix For: 1.13.0
>
>
> In FLINK-15578, an API and its implementation were added to JDBC connector to 
> support exactly-once semantics for sinks. The implementation uses JDBC XA 
> transactions.
> The scope of this task is to make sure:
>  # The feature is well-documented
>  # The API is reasonably easy to use
>  # The implementation works as expected
>  ## normal case: database is updated on checkpointing
>  ## failure and recovery case: no duplicates inserted, no records skipped
>  ## several DBs: postgressql, mssql, oracle (mysql has a known issue: 
> FLINK-21743)
>  ## concurrent checkpoints > 1, DoP > 1
>  # Logging is meaningful



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to