Dennis-Mircea commented on PR #193: URL: https://github.com/apache/flink-connector-jdbc/pull/193#issuecomment-4846785550
> Hi @Dennis-Mircea! > > Thank you for your quick updates! I've reviewed the changes and checked the Jira ticket. > > I noticed a couple of other things in this PR that are different from the fixes you made, and I'd like to request your help with them: > > > Both `docs/content/docs/connectors/datastream/jdbc.md` and `docs/content.zh/docs/connectors/datastream/jdbc.md` have the same issues. > > 1. Under the "JDBC execution options" section, the indentation of `.build();` in the first code block doesn't seem to match the one below. Could you align it with the code below? > > <img alt="image" width="889" height="390" src="https://private-user-images.githubusercontent.com/45858414/610829227-1c73d221-a12a-4b49-b890-801cd2bd7936.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI4NDQ2MjYsIm5iZiI6MTc4Mjg0NDMyNiwicGF0aCI6Ii80NTg1ODQxNC82MTA4MjkyMjctMWM3M2QyMjEtYTEyYS00YjQ5LWI4OTAtODAxY2QyYmQ3OTM2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA2MzAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNjMwVDE4MzIwNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE3MWNjMzEyZjk1ZTQzNDQ0MDBlZTNmYzU1MjZjZThlMWNiOGEyMzgxNjNmMzZkYzkyYzY1NDQ4NGVjMmJjZjMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.y7WyMMepFdxqMsX55UvYSAoG-Y2ft0zsv77HUJkXtSg"> > > https://nightlies.apache.org/flink/flink-docs-release-2.2/docs/connectors/datastream/jdbc/#jdbc-execution-options > > 2. Under the "JdbcSink.exactlyOnceSink" section, could you update the `env.fromElements` part to match the code shown below? > > <img alt="image" width="879" height="644" src="https://private-user-images.githubusercontent.com/45858414/610829367-b1ceaab2-8f85-41df-a729-cbb668545daa.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI4NDQ2MjYsIm5iZiI6MTc4Mjg0NDMyNiwicGF0aCI6Ii80NTg1ODQxNC82MTA4MjkzNjctYjFjZWFhYjItOGY4NS00MWRmLWE3MjktY2JiNjY4NTQ1ZGFhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA2MzAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNjMwVDE4MzIwNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTlmODQzNGViZTdlYjA0YjEwY2E2MWU4OGE2YjgyODVkZGI1NTA1MjU2YTQzNWVmZjYwZGNjMDBiNmIzZGFlODgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.AgYv1tGvxRH4kXRHcFwb9Tn581Vev4CrlZGv_wZjFf4"> > > https://nightlies.apache.org/flink/flink-docs-release-2.2/docs/connectors/datastream/jdbc/#jdbcsinkexactlyoncesink > > ```java > StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(); > env.fromElements(...) > .addSink( > JdbcSink.exactlyOnceSink( > "insert into books (id, title, author, price, qty) values (?,?,?,?,?)", > (ps, t) -> { > ps.setInt(1, t.id); > ps.setString(2, t.title); > ps.setString(3, t.author); > ps.setDouble(4, t.price); > ps.setInt(5, t.qty); > }, > JdbcExecutionOptions.builder().withMaxRetries(0).build(), > JdbcExactlyOnceOptions.defaults(), > () -> { > // create a driver-specific XA DataSource > // The following example is for derby > EmbeddedXADataSource ds = new EmbeddedXADataSource(); > ds.setDatabaseName("my_db"); > return ds; > })); > env.execute(); > ``` > > 3. Once you've finished the changes, could you create a total of 2 commits — one for the main fix with the commit message matching the PR title, and one for the indentation alignment fix — then request a review again? > > Please don't hesitate to point out anything I may have missed or gotten wrong. I'd really appreciate it! cc. @RocMarshal @ocb3916 > > Thank you! I addressed it now! Thanks for the suggestion. I also made 2 commits, so the split is crystal clear now. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
