Re: Making calls to external API wit Data Streams

2018-10-12 Thread Dominik Wosiński
Hey, It seems that You have written Async function that takes *String* and returns *String*. But in execution you expect the result of the function to be the tuple (*String, String).* That's where the mismatch occurs, the function itself is ok :) If you will change *DataStream[(String,String)] *t

Re: Making calls to external API wit Data Streams

2018-10-12 Thread Krishna Kalyan
Thanks for the quick reply Dom, I am using flink 1.6.1. [image: image.png] Error: Type Mismatch expected AsyncFunction actual AsyncWeatherAPIRequest On Fri, 12 Oct 2018 at 16:21, Dominik Wosiński wrote: > Hey, > What is the exact issue that you are facing and the Flink version that you > ar

Re: Making calls to external API wit Data Streams

2018-10-12 Thread Dominik Wosiński
Hey, What is the exact issue that you are facing and the Flink version that you are using ?? Best Regards, Dom. pt., 12 paź 2018 o 16:11 Krishna Kalyan napisał(a): > Hello All, > > I need some help making async API calls. I have tried the following code > below. > > class AsyncWeatherAPIReques

Making calls to external API wit Data Streams

2018-10-12 Thread Krishna Kalyan
Hello All, I need some help making async API calls. I have tried the following code below. class AsyncWeatherAPIRequest extends AsyncFunction[String, String] { override def asyncInvoke(input: String, resultFuture: ResultFuture[String]): Unit = { val query = url("") val response = Http.d