RideCleansingToKafka Filter Parameter Type

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

RideCleansingToKafka Filter Parameter Type

daviD
Greetings,
First, thanks to DataArtisans for putting together Apache Flink® Training documentation. Its proving to be a practical way to learn both Flink and Scala.
In compiling our exercise writing to Kafka, I am getting following error "missing parameter type" where the parameter 'r' seems not to be recognized in filter method. Code snippet as follows:
val rides = env.addSource(new TaxiRideSource(input, maxEventsDelay, streamServingSpeed))

val filteredRides = rides.filter(r => GeoUtils.isInNYC(r.startLon, r.startLat) && GeoUtils.isInNYC(r.endLon, r.endLat))Any advice would be appreciated.
Thanks


Reply | Threaded
Open this post in threaded view
|

Re: RideCleansingToKafka Filter Parameter Type

Andrey Melentyev
Hi daviD,

does it compile okay if you clone the https://github.com/
fhueske/flink-training-exercises/ directly without any changes? The repo
contains the example you are referring to and seems to compile just fine on
my machine both with Maven and IntelliJ.

In case it still doesn't work for you, would you mind sharing the output of
"mvn compile"?

Andrey

On Fri, Nov 4, 2016 at 12:22 PM, daviD <[hidden email]> wrote:

> Greetings,
> First, thanks to DataArtisans for putting together Apache Flink® Training
> documentation. Its proving to be a practical way to learn both Flink and
> Scala.
> In compiling our exercise writing to Kafka, I am getting following error
> "missing parameter type" where the parameter 'r' seems not to be recognized
> in filter method. Code snippet as follows:
> val rides = env.addSource(new TaxiRideSource(input, maxEventsDelay,
> streamServingSpeed))
>
> val filteredRides = rides.filter(r => GeoUtils.isInNYC(r.startLon,
> r.startLat) && GeoUtils.isInNYC(r.endLon, r.endLat))Any advice would be
> appreciated.
> Thanks
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: RideCleansingToKafka Filter Parameter Type

daviD
Thanks Andrey,
I just cloned the repo you sent below and compiled it. It compiled just fine without any errors. I then looked at the imports in the in RideCleansingToKafka.scala and compared that to the program i'm working on and noticed that I was missing a rather important package: org.apache.flink.streaming.api.scala._
I imported the package and now it compiles without errors.
Thanks for the second look Andrey.
-daviD

    On Friday, November 4, 2016 4:29 AM, Andrey Melentyev <[hidden email]> wrote:
 

 Hi daviD,

does it compile okay if you clone the https://github.com/
fhueske/flink-training-exercises/ directly without any changes? The repo
contains the example you are referring to and seems to compile just fine on
my machine both with Maven and IntelliJ.

In case it still doesn't work for you, would you mind sharing the output of
"mvn compile"?

Andrey

On Fri, Nov 4, 2016 at 12:22 PM, daviD <[hidden email]> wrote:

> Greetings,
> First, thanks to DataArtisans for putting together Apache Flink® Training
> documentation. Its proving to be a practical way to learn both Flink and
> Scala.
> In compiling our exercise writing to Kafka, I am getting following error
> "missing parameter type" where the parameter 'r' seems not to be recognized
> in filter method. Code snippet as follows:
> val rides = env.addSource(new TaxiRideSource(input, maxEventsDelay,
> streamServingSpeed))
>
> val filteredRides = rides.filter(r => GeoUtils.isInNYC(r.startLon,
> r.startLat) && GeoUtils.isInNYC(r.endLon, r.endLat))Any advice would be
> appreciated.
> Thanks
>
>
>