och5351 commented on code in PR #193:
URL:
https://github.com/apache/flink-connector-jdbc/pull/193#discussion_r3445702121
##########
docs/content/docs/connectors/datastream/jdbc.md:
##########
@@ -416,26 +409,26 @@ StreamExecutionEnvironment env =
StreamExecutionEnvironment.getExecutionEnvironm
env
.fromElements(...)
.addSink(JdbcSink.exactlyOnceSink(
- "insert into books (id, title, author, price, qty) values
(?,?,?,?,?)",
+ "insert into books (id, title, author, price, qty)
values (?,?,?,?,?)",
(ps, t) -> {
- ps.setInt(1, t.id);
+ 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()
+ JdbcExecutionOptions.builder()
.withMaxRetries(0)
.build(),
JdbcExactlyOnceOptions.defaults(),
() -> {
- // create a driver-specific XA DataSource
- // The following example is for derby
- EmbeddedXADataSource ds = new EmbeddedXADataSource();
+// create a driver-specific XA DataSource
+// The following example is for derby
+EmbeddedXADataSource ds = new EmbeddedXADataSource();
Review Comment:
Please check the indentation here.
##########
docs/content/docs/connectors/datastream/jdbc.md:
##########
@@ -416,26 +409,26 @@ StreamExecutionEnvironment env =
StreamExecutionEnvironment.getExecutionEnvironm
env
.fromElements(...)
.addSink(JdbcSink.exactlyOnceSink(
- "insert into books (id, title, author, price, qty) values
(?,?,?,?,?)",
+ "insert into books (id, title, author, price, qty)
values (?,?,?,?,?)",
(ps, t) -> {
- ps.setInt(1, t.id);
+ ps.setInt(1, t.id);
Review Comment:
Indentation looks off — should match the other `ps.set*` lines.
##########
docs/content/docs/connectors/datastream/jdbc.md:
##########
@@ -416,26 +409,26 @@ StreamExecutionEnvironment env =
StreamExecutionEnvironment.getExecutionEnvironm
env
.fromElements(...)
.addSink(JdbcSink.exactlyOnceSink(
- "insert into books (id, title, author, price, qty) values
(?,?,?,?,?)",
+ "insert into books (id, title, author, price, qty)
values (?,?,?,?,?)",
(ps, t) -> {
- ps.setInt(1, t.id);
+ 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()
+ JdbcExecutionOptions.builder()
.withMaxRetries(0)
.build(),
JdbcExactlyOnceOptions.defaults(),
() -> {
- // create a driver-specific XA DataSource
- // The following example is for derby
- EmbeddedXADataSource ds = new EmbeddedXADataSource();
+// create a driver-specific XA DataSource
+// The following example is for derby
+EmbeddedXADataSource ds = new EmbeddedXADataSource();
ds.setDatabaseName("my_db");
return ds;
});
-env.execute();
+ env.execute();
Review Comment:
`env.execute()` should be at the top level, not indented.
--
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]