flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timo Walther <twal...@apache.org>
Subject Re: jdbc.JDBCInputFormat
Date Wed, 12 Oct 2016 10:10:24 GMT
Hi Alberto,

you need to checkout the branch, run `mvn clean install` to put this 
version in your Maven repo and the `pom.xml` of your project should 
point to Flink version `1.2-SNAPSHOT`.

Timo


Am 11/10/16 um 19:47 schrieb Alberto Ramón:
> Hello
>
> I downloaded and compile your branch:
> Imágenes integradas 3
>
> And the error is the same:
> Imágenes integradas 2
>
> (I tested with SQuirreL and works OK)
>
>
> *If you want any log / test , feel free to contact with me  ¡¡*¡
>
>
>
> /Additional INFO:/
>   Scala:  String = version 2.11.8
>
> I created the template project with:
> |mvn archetype:generate \|
> |-DarchetypeGroupId=org.apache.flink \|
> |-DarchetypeArtifactId=flink-quickstart-scala \|
> |-DarchetypeVersion=1.1.2 \|
> |-DgroupId=org.apache.flink.quickstart \|
> |-DartifactId=flink-scala-project \|
> |-Dversion=0.1 \|
> |-Dpackage=org.apache.flink.quickstart \|
> |-DinteractiveMode=false|
> And the coded is attached:
>
> 2016-10-11 12:01 GMT+02:00 Alberto Ramón <a.ramonportoles@gmail.com 
> <mailto:a.ramonportoles@gmail.com>>:
>
>     I will check it this nigth
>
>     Thanks
>
>     2016-10-11 11:24 GMT+02:00 Timo Walther <twalthr@apache.org
>     <mailto:twalthr@apache.org>>:
>
>         I have opened a PR (https://github.com/apache/flink/pull/2619
>         <https://github.com/apache/flink/pull/2619>). Would be great
>         if you could try it and comment if it solves you problem.
>
>         Timo
>
>         Am 10/10/16 um 17:48 schrieb Timo Walther:
>>         I could reproduce the error locally. I will prepare a fix for it.
>>
>>         Timo
>>
>>         Am 10/10/16 um 11:54 schrieb Alberto Ramón:
>>>         It's from Jun and Unassigned   :(
>>>         Is There a Workarround?
>>>
>>>         I'm will try to contact with the reporter , Martin Scholl )
>>>
>>>         2016-10-10 11:04 GMT+02:00 Timo Walther <twalthr@apache.org
>>>         <mailto:twalthr@apache.org>>:
>>>
>>>             I think you already found the correct issue describing
>>>             your problem ( FLINK-4108). This should get higher priority.
>>>
>>>             Timo
>>>
>>>             Am 09/10/16 um 13:27 schrieb Alberto Ramón:
>>>>
>>>>             After solved some issues, I connected with Kylin, but I
>>>>             can't read data
>>>>
>>>>             import org.apache.flink.api.scala._
>>>>             import org.apache.flink.api.java.io
>>>>             <http://org.apache.flink.api.java.io>.jdbc.JDBCInputFormat
>>>>             import org.apache.flink.api.table.Row
>>>>             import org.apache.flink.api.table.typeutils.RowTypeInfo
>>>>             import org.apache.flink.api.common.typeinfo.{BasicTypeInfo, TypeInformation}
>>>>             var stringColum: TypeInformation[Int] =createTypeInformation[Int]
>>>>             val DB_ROWTYPE =new RowTypeInfo(Seq(stringColum))
>>>>
>>>>             val inputFormat = JDBCInputFormat.buildJDBCInputFormat()
>>>>                .setDrivername("org.apache.kylin.jdbc.Driver")
>>>>                .setDBUrl("jdbc:kylin://172.17.0.2:7070/learn_kylin
>>>>             <http://172.17.0.2:7070/learn_kylin>")
>>>>                .setUsername("ADMIN")
>>>>                .setPassword("KYLIN")
>>>>                .setQuery("select count(distinct seller_id) as sellers from
>>>>             kylin_sales group by part_dt order by part_dt")
>>>>                .setRowTypeInfo(DB_ROWTYPE)
>>>>                .finish()
>>>>
>>>>                val dataset =env.createInput(inputFormat)
>>>>             dataset.print()
>>>>
>>>>             The error is:
>>>>             Imágenes integradas 1
>>>>
>>>>
>>>>             (I checked that queries and  config are correct with SQuirriel)
>>>>             (Isn't a connection problem, Because if I turn off database the
error is different "Reused Connection")
>>>>
>>>>
>>>>             Can you see a problem in my code? (I found  Flink 4108 unsolved
issue,I don't know if is related)
>>>>
>>>>             BR, Alberto
>>>>             2016-10-07 21:46 GMT+02:00 Fabian Hueske
>>>>             <fhueske@gmail.com <mailto:fhueske@gmail.com>>:
>>>>
>>>>                 As the exception says the class
>>>>                 org.apache.flink.api.scala.io
>>>>                 <http://org.apache.flink.api.scala.io>.jdbc.JDBCInputFormat
>>>>                 does not exist. You have to do: import
>>>>                 org.apache.flink.api.java.io
>>>>                 <http://org.apache.flink.api.java.io>.jdbc.JDBCInputFormat
>>>>
>>>>                 There is no Scala implementation of this class but
>>>>                 you can also use Java classes in Scala.
>>>>                 2016-10-07 21:38 GMT+02:00 Alberto Ramón
>>>>                 <a.ramonportoles@gmail.com
>>>>                 <mailto:a.ramonportoles@gmail.com>>:
>>>>
>>>>                     I want use CreateInput + buildJDBCInputFormat
>>>>                     to acces to database on SCALA
>>>>                     PB1:
>>>>
>>>>                     import org.apache.flink.api.scala.io
>>>>                     <http://org.apache.flink.api.scala.io>.jdbc.JDBCInputFormat
>>>>                     Error:(25, 37) object jdbc is not a member of
>>>>                     package org.apache.flink.api.java.io
>>>>                     <http://org.apache.flink.api.java.io> import
>>>>                     org.apache.flink.api.java.io
>>>>                     <http://org.apache.flink.api.java.io>.jdbc.JDBCInputFormat
>>>>
>>>>                     Then, I can't use:
>>>>                     Imágenes integradas 1
>>>>
>>>>                     I tried to download code from git and recompile, also
>>>>
>>>             -- 
>>>             Freundliche Grüße / Kind Regards
>>>
>>>             Timo Walther
>>>
>>>             Follow me: @twalthr
>>>             https://www.linkedin.com/in/twalthr
>>>             <https://www.linkedin.com/in/twalthr>
>>>
>>         -- 
>>         Freundliche Grüße / Kind Regards
>>
>>         Timo Walther
>>
>>         Follow me: @twalthr
>>         https://www.linkedin.com/in/twalthr
>>         <https://www.linkedin.com/in/twalthr>
>
>         -- 
>         Freundliche Grüße / Kind Regards
>
>         Timo Walther
>
>         Follow me: @twalthr
>         https://www.linkedin.com/in/twalthr
>         <https://www.linkedin.com/in/twalthr>
>
-- 
Freundliche Grüße / Kind Regards

Timo Walther

Follow me: @twalthr
https://www.linkedin.com/in/twalthr

Mime
View raw message