flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ches...@apache.org
Subject [1/6] flink git commit: [hotfix] Update DataSet docs concerning JDBCInputFormat.
Date Fri, 02 Jun 2017 13:14:19 GMT
Repository: flink
Updated Branches:
  refs/heads/master cd5b4a630 -> 94ade3de9


[hotfix] Update DataSet docs concerning JDBCInputFormat.

The way to provide type information was outdated.


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/94ade3de
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/94ade3de
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/94ade3de

Branch: refs/heads/master
Commit: 94ade3de9f7345820e869940ced40bce3e9fae38
Parents: 5605107
Author: Maximilian Bode <maximilian.bode@tngtech.com>
Authored: Wed May 31 18:48:51 2017 +0200
Committer: zentol <chesnay@apache.org>
Committed: Fri Jun 2 15:13:55 2017 +0200

----------------------------------------------------------------------
 docs/dev/batch/index.md | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/94ade3de/docs/dev/batch/index.md
----------------------------------------------------------------------
diff --git a/docs/dev/batch/index.md b/docs/dev/batch/index.md
index 6fccc04..9a8ce22 100644
--- a/docs/dev/batch/index.md
+++ b/docs/dev/batch/index.md
@@ -890,14 +890,12 @@ DataSet<Long> numbers = env.generateSequence(1, 10000000);
 // Read data from a relational database using the JDBC input format
 DataSet<Tuple2<String, Integer> dbData =
     env.createInput(
-      // create and configure input format
       JDBCInputFormat.buildJDBCInputFormat()
                      .setDrivername("org.apache.derby.jdbc.EmbeddedDriver")
                      .setDBUrl("jdbc:derby:memory:persons")
                      .setQuery("select name, age from persons")
-                     .finish(),
-      // specify type information for DataSet
-      new TupleTypeInfo(Tuple2.class, STRING_TYPE_INFO, INT_TYPE_INFO)
+                     .setRowTypeInfo(new RowTypeInfo(BasicTypeInfo.STRING_TYPE_INFO, BasicTypeInfo.INT_TYPE_INFO))
+                     .finish()
     );
 
 // Note: Flink's program compiler needs to infer the data types of the data items which are
returned


Mime
View raw message