Hi,
I tried mocking the Async operator which takes Tuple1, Tuple3 as Input & Output but while creating a test harness I couldn't find the right TupleSerializer. Can anyone help me on this? public class GetMetadataAsyncProcess extends RichAsyncFunction<Tuple1<Map<String, List<String>>>, Tuple3<Map<String, List<String>>, Map<String, String>, List<Map<String, Integer>>>> {...} Creating a harness without passing TypeSerializer results in the following error. java.lang.NullPointerException |
Hi Arpith, looking at the definition of the GetMetadataAsyncProcess function you need to specify the TypeSerializer for a Tuple1<Map<String, List<String>>>. What you could try in order to not create the serializer manually is to use: TypeInformation.of(new TypeHint<Tuple1<Map<String, List<String>>>>(){}).createSerializer(new ExecutionConfig()) This should hopefully create the correct serializer. Cheers, Till On Tue, Feb 16, 2021 at 11:33 AM Arpith techy <[hidden email]> wrote:
|
Hi Arpith, The operator test harness is more meant for use cases where you implement your own operator (quite advanced). If you just want to test your AsyncFunction, I'd strongly recommend building a small ITCase like [1] and then you don't have to fiddle with these things anymore. The tests run very fast and test much more than the operator harness, which just simulates the execution somewhat. On Tue, Feb 16, 2021 at 1:47 PM Till Rohrmann <[hidden email]> wrote:
|
Thanks Till, your solution worked perfectly. Arpith On Wed, Feb 17, 2021 at 12:53 AM Arvid Heise <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |