flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jiayi (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-7554) Add a testing RuntimeContext to test utilities
Date Wed, 28 Mar 2018 17:19:00 GMT

    [ https://issues.apache.org/jira/browse/FLINK-7554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16417779#comment-16417779

Jiayi commented on FLINK-7554:


I think I should let you know my idea about this issue before finishing the coding.

So.. Basically, there're two kinds of functions under "org.apache.flink.api.common.functions",
one is the function that returns value like "MapFunction" and "FilterFunction", the other
is the function without return like "FlatMapFunction".

In order to make both of them work, I'm going to create a class called "TestRuntimeUDFContextBase"
in the test scope, which extends "AbstractRuntimeUDFContext". And in this "TestRuntimeUDFContextBase",
I will create several functions to let developers interact with "State", "Broadcast" and "Collectors"

And I'll make sure that every function that belongs to package "org.apache.flink.api.common.functions",
is compatible with the "TestRuntimeUDFContextBase" before I submit the pull request.
 # Do you have any suggestion about it ?
 # Should I write my tests for the "TestRuntimeUDFContextBase"? I am sure if I should do it
because it'll be written in test package.

> Add a testing RuntimeContext to test utilities
> ----------------------------------------------
>                 Key: FLINK-7554
>                 URL: https://issues.apache.org/jira/browse/FLINK-7554
>             Project: Flink
>          Issue Type: New Feature
>          Components: Tests
>            Reporter: Timo Walther
>            Assignee: Jiayi
>            Priority: Major
>              Labels: starter
> When unit testing user-defined functions it would be useful to have an official testing
{{RuntimeContext}} that uses Java collections for storing state, metrics, etc.
> After executing the business logic, the user could then verify how the state of the UDF
changed or which metrics have been collected.
> This issue includes documentation for the "Testing" section.

This message was sent by Atlassian JIRA

View raw message