Hi,
I'm writing a custom serializer so I need to call the returns(TypeInformation) method after a reduce method, but it isn't available in the scala api, only in the java api. Do you have any suggestions how to go around this and still call the correct deserializer? Thanks! Judit |
Hi!
In Scala, the return TypeInformation is passed as an implicit parameter. You can always explicitly pass an implicit parameter, that would be the way to pass the return type explicitly in Scala. To create the TypeInformation, use the TypeInformation.of(...) methods. Hope that helps! Stephan On Mon, Apr 4, 2016 at 3:08 PM, Judit Fehér <[hidden email]> wrote: > Hi, > > I'm writing a custom serializer so I need to call the > returns(TypeInformation) method after a reduce method, but it isn't > available in the scala api, only in the java api. > Do you have any suggestions how to go around this and still call the > correct deserializer? > Thanks! > > Judit > |
Note that you should use `createTypeInfomation[T]` method in `org.apache.flink.api.scala` package object to create `TypeInformation` for Scala specific types such as case classes or tuples.
Regards, Chiwan Park > On Apr 5, 2016, at 1:53 AM, Stephan Ewen <[hidden email]> wrote: > > Hi! > > In Scala, the return TypeInformation is passed as an implicit parameter. > You can always explicitly pass an implicit parameter, that would be the way > to pass the return type explicitly in Scala. > > To create the TypeInformation, use the TypeInformation.of(...) methods. > > Hope that helps! > > Stephan > > > > On Mon, Apr 4, 2016 at 3:08 PM, Judit Fehér <[hidden email]> wrote: > >> Hi, >> >> I'm writing a custom serializer so I need to call the >> returns(TypeInformation) method after a reduce method, but it isn't >> available in the scala api, only in the java api. >> Do you have any suggestions how to go around this and still call the >> correct deserializer? >> Thanks! >> >> Judit >> |
Thank you! I'm implementing now using implicit parameters.
2016-04-05 7:14 GMT+02:00 Chiwan Park <[hidden email]>: > Note that you should use `createTypeInfomation[T]` method in > `org.apache.flink.api.scala` package object to create `TypeInformation` for > Scala specific types such as case classes or tuples. > > Regards, > Chiwan Park > > > On Apr 5, 2016, at 1:53 AM, Stephan Ewen <[hidden email]> wrote: > > > > Hi! > > > > In Scala, the return TypeInformation is passed as an implicit parameter. > > You can always explicitly pass an implicit parameter, that would be the > way > > to pass the return type explicitly in Scala. > > > > To create the TypeInformation, use the TypeInformation.of(...) methods. > > > > Hope that helps! > > > > Stephan > > > > > > > > On Mon, Apr 4, 2016 at 3:08 PM, Judit Fehér <[hidden email]> wrote: > > > >> Hi, > >> > >> I'm writing a custom serializer so I need to call the > >> returns(TypeInformation) method after a reduce method, but it isn't > >> available in the scala api, only in the java api. > >> Do you have any suggestions how to go around this and still call the > >> correct deserializer? > >> Thanks! > >> > >> Judit > >> > > |
Free forum by Nabble | Edit this page |