[
https://issues.apache.org/jira/browse/BEAM-13165?focusedWorklogId=675411&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-675411
]
ASF GitHub Bot logged work on BEAM-13165:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 04/Nov/21 00:48
Start Date: 04/Nov/21 00:48
Worklog Time Spent: 10m
Work Description: aromanenko-dev commented on a change in pull request
#15862:
URL: https://github.com/apache/beam/pull/15862#discussion_r742146784
##########
File path:
sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcIO.java
##########
@@ -2122,4 +1912,242 @@ public void populateDisplayData(DisplayData.Builder
builder) {
config.populateDisplayData(builder);
}
}
+
+ /**
+ * {@link DoFn} class to write results data to a JDBC sink. It supports
writing rows one by one
+ * (and returning individual results) - or by batch.
+ *
+ * @param <T>
+ * @param <V>
+ */
+ static class WriteFn<T, V> extends DoFn<T, V> {
+
+ @AutoValue
+ public abstract static class WriteFnSpec<T, V> implements Serializable,
HasDisplayData {
Review comment:
Do we need this class and its methods be `public`?
##########
File path:
sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcIO.java
##########
@@ -2122,4 +1912,242 @@ public void populateDisplayData(DisplayData.Builder
builder) {
config.populateDisplayData(builder);
}
}
+
+ /**
+ * {@link DoFn} class to write results data to a JDBC sink. It supports
writing rows one by one
+ * (and returning individual results) - or by batch.
+ *
+ * @param <T>
+ * @param <V>
+ */
+ static class WriteFn<T, V> extends DoFn<T, V> {
Review comment:
Keep it as `private`?
##########
File path:
sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcIO.java
##########
@@ -2122,4 +1912,242 @@ public void populateDisplayData(DisplayData.Builder
builder) {
config.populateDisplayData(builder);
}
}
+
+ /**
+ * {@link DoFn} class to write results data to a JDBC sink. It supports
writing rows one by one
+ * (and returning individual results) - or by batch.
+ *
+ * @param <T>
+ * @param <V>
+ */
+ static class WriteFn<T, V> extends DoFn<T, V> {
+
+ @AutoValue
+ public abstract static class WriteFnSpec<T, V> implements Serializable,
HasDisplayData {
Review comment:
Do we need this class and its methods be `public`?
##########
File path:
sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcIO.java
##########
@@ -2122,4 +1912,242 @@ public void populateDisplayData(DisplayData.Builder
builder) {
config.populateDisplayData(builder);
}
}
+
+ /**
+ * {@link DoFn} class to write results data to a JDBC sink. It supports
writing rows one by one
+ * (and returning individual results) - or by batch.
+ *
+ * @param <T>
+ * @param <V>
+ */
+ static class WriteFn<T, V> extends DoFn<T, V> {
Review comment:
Keep it as `private`?
--
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 675411)
Time Spent: 2.5h (was: 2h 20m)
> Significant code duplication between WriteFn and WriteWithResultsFn
> -------------------------------------------------------------------
>
> Key: BEAM-13165
> URL: https://issues.apache.org/jira/browse/BEAM-13165
> Project: Beam
> Issue Type: Task
> Components: io-java-jdbc
> Reporter: Pablo Estrada
> Assignee: Pablo Estrada
> Priority: P2
> Time Spent: 2.5h
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)