How to find correct import packages ?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to find correct import packages ?

Esa Heikkinen

Hi

 

I am newbie with Flink, Maven and Scala.

 

What is the best way to find the correct imports packages ? (There are not always in documentation ? at least not very clearly)

 

For example I did not find what “import package” I should use in readCsvFile() ?

 

Also something needs to be added pom.xml and how to know what to add to it ?

 

Esa

 

Reply | Threaded
Open this post in threaded view
|

Re: How to find correct import packages ?

m@xi
Hello Esa,

First I would recommend to use Intellij as your IDE. There you may enable
auto-completion imports that are needed, or you can select manually from all
the available options of imports.

Furthermore, the Apache Flink Documentation page, [1], is not that thorough
in many aspects, but it is a good reference for starters. Thus, you may
consult the Javadocs [2] which are more instructive in my humble opinion.

As for Scala, I have only found documentation for DataSet component, [3],
this is one reason that I moved from Scala to Java.

Best,
Max

[1] -- https://ci.apache.org/projects/flink/flink-docs-release-1.4/

[2] -- https://ci.apache.org/projects/flink/flink-docs-release-1.4/api/java/

[3] --
https://ci.apache.org/projects/flink/flink-docs-release-1.4/api/scala/index.html#org.apache.flink.api.scala.package



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

RE: How to find correct import packages ?

Esa Heikkinen
Hello

I use (but it is not familiar) IntelliJ IDEA, but there are many settings. What is the exactly place for enabling the auto-completion imports ?

Esa

-----Original Message-----
From: m@xi [mailto:[hidden email]]
Sent: Friday, February 16, 2018 12:42 PM
To: [hidden email]
Subject: Re: How to find correct import packages ?

Hello Esa,

First I would recommend to use Intellij as your IDE. There you may enable auto-completion imports that are needed, or you can select manually from all the available options of imports.

Furthermore, the Apache Flink Documentation page, [1], is not that thorough in many aspects, but it is a good reference for starters. Thus, you may consult the Javadocs [2] which are more instructive in my humble opinion.

As for Scala, I have only found documentation for DataSet component, [3], this is one reason that I moved from Scala to Java.

Best,
Max

[1] -- https://ci.apache.org/projects/flink/flink-docs-release-1.4/

[2] -- https://ci.apache.org/projects/flink/flink-docs-release-1.4/api/java/

[3] --
https://ci.apache.org/projects/flink/flink-docs-release-1.4/api/scala/index.html#org.apache.flink.api.scala.package



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

RE: How to find correct import packages ?

m@xi
Well,

you must always "google it" before asking in the lists.

https://stackoverflow.com/questions/31211842/any-way-or-shortcut-to-auto-import-the-classes-in-intellij-idea-like-in-eclips

Also, if you wanna add a dependency in pom.xml (which is essentially the
sceleton of your flink program, that has information about the flink, java,
scala version and the libraries you are using), you add it in the dependency
section. In my case after I added a library for e.g. metrics, then Intellij
IDEA prompted me to enable the auto import.

Best,
Max



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/