[ 
https://issues.apache.org/jira/browse/BEAM-5619?focusedWorklogId=150604&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-150604
 ]

ASF GitHub Bot logged work on BEAM-5619:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 03/Oct/18 05:01
            Start Date: 03/Oct/18 05:01
    Worklog Time Spent: 10m 
      Work Description: jbonofre closed pull request #6553: [BEAM-5619] Fix 
minor bug in JdbcIO example code
URL: https://github.com/apache/beam/pull/6553
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcIO.java 
b/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcIO.java
index 6cb5c932338..bbb4ded6aa6 100644
--- a/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcIO.java
+++ b/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcIO.java
@@ -136,8 +136,8 @@
  *      .withPreparedStatementSetter(new 
JdbcIO.PreparedStatementSetter<KV<Integer, String>>() {
  *        public void setParameters(KV<Integer, String> element, 
PreparedStatement query)
  *          throws SQLException {
- *          query.setInt(1, kv.getKey());
- *          query.setString(2, kv.getValue());
+ *          query.setInt(1, element.getKey());
+ *          query.setString(2, element.getValue());
  *        }
  *      })
  *    );


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 150604)
    Time Spent: 20m  (was: 10m)

> Fix minor bug in JdbcIO example code
> ------------------------------------
>
>                 Key: BEAM-5619
>                 URL: https://issues.apache.org/jira/browse/BEAM-5619
>             Project: Beam
>          Issue Type: Bug
>          Components: io-java-jdbc
>            Reporter: Kengo Seki
>            Assignee: Kengo Seki
>            Priority: Trivial
>             Fix For: 2.8.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> There's a minor bug in JdbcIO Javadoc:
> {code}
> 127  * <pre>{@code
> 128  * pipeline
> 129  *   .apply(...)
> 130  *   .apply(JdbcIO.<KV<Integer, String>>write()
> 131  *      
> .withDataSourceConfiguration(JdbcIO.DataSourceConfiguration.create(
> 132  *            "com.mysql.jdbc.Driver", "jdbc:mysql://hostname:3306/mydb")
> 133  *          .withUsername("username")
> 134  *          .withPassword("password"))
> 135  *      .withStatement("insert into Person values(?, ?)")
> 136  *      .withPreparedStatementSetter(new 
> JdbcIO.PreparedStatementSetter<KV<Integer, String>>() {
> 137  *        public void setParameters(KV<Integer, String> element, 
> PreparedStatement query)
> 138  *          throws SQLException {
> 139  *          query.setInt(1, kv.getKey());
> 140  *          query.setString(2, kv.getValue());
> 141  *        }
> 142  *      })
> 143  *    );
> 144  * }</pre>
> {code}
> {{kv}} at the line 139 and 140 should be {{element}}.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to